-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Using AND for the default_operator
in a query_string
doesn't appear to be working unless term is quoted
#30131
Comments
Pinging @elastic/es-search-aggs |
This is the expected behavior. The reason for this is that Elasticsearch relies on the analyzer to split everything that it in-between query operators into terms. I'm adding the |
in the real index where I noticed the issue, there is a custom analyser for the index. I removed it for a simpler test case
would that not get picked up for the field or does keyword analyser trump the default analyser set on the index? |
The default analyzer only applies to |
it was - looking at changing the indexing structure now to see if that helps |
So after tweaking the code a bit I now have the following index structure
Previous, the mappings were very dynamic and in the worst case we could end up with 7500+ fields in the mapping :-(
Thanks for you helping me fix this - happy for you to close as non issue |
I'll close as a non issue, but we agreed to follow up on the idea to make it possible to split keywords on whitespace at query time: #30393. |
Elasticsearch version: 6.2.1
Plugins installed: []
JVM version:
OS version:
Linux 3.10.0-514.10.2.el7.x86_64 #1 SMP Fri Mar 3 00:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Description of the problem including expected versus actual behavior:
Using AND for the
default_operator
in aquery_string
doesn't appear to be working unless term is quoted.If I run a query I would expect to get 1 document back for, I get zero results. If I quote one of the terms I then get the required result. For example, searching for
3150185 J3050
versus3150185 "J3050"
:versus
Steps to reproduce:
Note that putting the explicit AND in gives the expected result:
gives
The text was updated successfully, but these errors were encountered: