Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language configuration is overwriting defined analyzer in mapping #21

Open
tmotyl opened this issue Feb 2, 2022 · 0 comments
Open

Language configuration is overwriting defined analyzer in mapping #21

tmotyl opened this issue Feb 2, 2022 · 0 comments

Comments

@tmotyl
Copy link
Contributor

tmotyl commented Feb 2, 2022

You can't specify custom analyzer when you also define language in yaml config.
this config

page_title:
  type: text
  analyzer: typo3_analyzer

Will be replaced by config parser with;

page_title:
  type: text
  analyzer: english

If you have language defined

see:

if (array_key_exists('analyzer', $config)) {

The CLI output of the commands is misleading, as it shows the diff like:

Remapping and recreating index docsearch
[debug] Elastica Request
[debug] Get mapping configuration for docsearch
[info] Diff: 
--- On Server
+++ In Configuration
-    [page_title.analyzer] => english
+    [page_title.analyzer] => typo3_analyzer
-    [snippet_content.analyzer] => english
+    [snippet_content.analyzer] => typo3_analyzer
-    [snippet_title.analyzer] => english
+    [snippet_title.analyzer] => typo3_analyzer

[info] Remapping docsearch in language english
[debug] Elastica Request
[debug] Elastica Request
[debug] Deleting index docsearch
[debug] Elastica Request
[debug] Elastica Request
[debug] Creating index docsearch

in Elasticorn.yaml
I have

languages:
  - english

tmotyl added a commit to TYPO3-Documentation/t3docs-search-indexer that referenced this issue Feb 2, 2022
… chars

Add custom filter and analyzer
Add missing fields to mapping
Remove language configuration as it was conflicting with
custom analyzer config see
TYPO3GmbH/elasticorn#21
tmotyl added a commit to TYPO3-Documentation/t3docs-search-indexer that referenced this issue Feb 2, 2022
… chars

Add custom filter and analyzer
Add missing fields to mapping
Remove language configuration as it was conflicting with
custom analyzer config see
TYPO3GmbH/elasticorn#21
Allow searching by extension key (also by fragment
- analyze the extension key)
susannemoog pushed a commit to TYPO3-Documentation/t3docs-search-indexer that referenced this issue Feb 4, 2022
… chars (#32)

Add custom filter and analyzer
Add missing fields to mapping
Remove language configuration as it was conflicting with
custom analyzer config see
TYPO3GmbH/elasticorn#21
Allow searching by extension key (also by fragment
- analyze the extension key)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant