-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[BUG] default_search analyzer in index settings overrides the analyzer defined in mapping #11100
Comments
@gaobinlong this is expected behaviour, the
|
I think if no
, and if we change
|
@gaobinlong shamelessly quoiting Elasticsearch docs [1] (that we have inherited). At search time, Elasticsearch determines which analyzer to use by checking the following parameters in order:
[1] https://www.elastic.co/guide/en/elasticsearch/reference/current/specify-analyzer.html |
Yeah -- while (perhaps) confusing, it's longstanding behavior that search analyzers will take precedence over the index-time analyzers. Maybe we could define a new field-level analyzer parameter ( |
In my understanding, |
Close this issue as we didn't reach consensus, will open a new one if users complain about it. |
Describe the bug
When there's a default_search analyzer defined in index settings and an analyzer defined in the mapping of a field, when indexing, the analyzer in mapping is used, but when searching, the default_search analyzer will be used, so the search results are not as expected.
To Reproduce
, nothing return.
Expected behavior
The analyzer defined in mapping takes precedence over the default_search analyzer in settings.
Host/Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: