-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
Should the term query apply normalizers to the search text when searching keyword fields #25487
Comments
Discussed in FixitFriday, we will make the |
Pinging @elastic/es-search-aggs |
removing normalization feels like a breaking change, is it one? |
@jpountz & @colings86 I think, this is a very good new feature introduced in elasticsearch. Otherwise, users should apply manually the same normalizer before searching data with term-level query. I updated the documentation to cover this new feature here. Related documentation pages are: So I don't know if removing normalization (before searching with term-level query) is still relevant ? |
We had a team discussion today, but still have not reached conclusion on this topic.
There was also an idea to make terms queries on text fields apply normalization as well. |
We have made a decision NOT to do this and keep the existing behaviour when term queries apply normalizers for keyword fields. |
This issue was inspired by https://discuss.elastic.co/t/term-request-with-normalized-keyword-behave-strangely/91120
At the moment if you run a term query on a text field the terms in your query are not passed through the analyzer for that field and instead are considered as the raw terms to search in the index.
In contrary, for keyword fields, the term text is passed through the normalizer for the field, which seems a bit unexpected to me as I had always considered the term query to be used to run raw un-modified searches and the match query to be used when you wanted to applied analysis to the search terms.
The text was updated successfully, but these errors were encountered: