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
Don't honor lowercase expanded terms in regex query generated from query string query #3922
Comments
Or at least we shouldn't lowercase expanded terms when we're querying a |
+1 running into this issue as well |
We should add a (default) third setting for the |
+1 Was about to open a new issue then I stumbled across this. Running into this alot lately with both Kibana and Graylog. Issue is with not_analyzed field using regex for us as well. |
👍 |
I wonder why we even need this setting. The analysis process should take care of lowercasing, if it's desirable for the fields in question, which is not a query-global decision, and it should otherwise not touch the entry. |
Highly related to #9978 |
Closing in favour of #9978 |
On the mailing list a user was using a query string query against an unanalyzed field that contained values such as:
5.2
5.3-SNAPSHOT
He wanted to return all documents that were not a snapshot version so they used a query string like
-version:/.*SNAPSHOT/
. This did not work. Turns out thatlowercase_expanded_terms
was turning the regex into-version:/.*snapshot/
which doesn't match the unanalyzed field due to case.He was using Kibana which does not currently expose the lowercaseExpandedTerms option, so the user really had no way to fix this without changing the mapping and reindexing or patching kibana.
Should the lowercase_expanded_terms option even be honored in a regex query? I would think no.
I did not see a way to set a case insensitive flag on the lucene regex query and the
(?i)
flag from java regex did not work.The text was updated successfully, but these errors were encountered: