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
query_string query with wildcard not working when searching within nested objects #18520
Comments
@clintongormley Sorry but i do not fully understand your response. How could i then change my situation in order to make it work. You have to agree that the id field in the mapping i posted is also not analyzed but there the wildcard (location_*) works and for a field in the nested object it does not? Do you then recommend setting lowercase_expanded_terms to false for the nested query? |
Yes, the
As long as you're only planning on using wildcards on This is not an easy problem to solve, which is why #9978 is marked as high hanging fruit. It requires a big rewrite of our analysis framework. |
Ok i think i got it. So in order for my to avoid setting lowercase_expanded_terms to false i could analyse the field i am searching on with applying a lowercase filter on it in the mapping. Correct? |
So i can indeed confirm if you apply a lowercase filter on the country_code field (by setting up a analyzer in the mapping) i don't need to set lowercase_expanded_terms to false anymore and a query_string search for B* or b* will return both documents. thnx for this clarification |
Elasticsearch version: 2.3
JVM version: 1.8.0_25
OS version: OSX 10.11.5
Description of the problem including expected versus actual behavior:
Steps to reproduce:
I am indexing the following document with a nested type locations:
When i try todo an extact match using query_string it works:
When i try todo a wildcard it does not return anything:
It seems to only not be working for nested datatypes because if i do a query_string with a wildcard on a property of the main document it works as expected:
So is this a limitation of the nested datatype that it does not work with wildcard when using query_string? And if yes where is it documented? The weird thing is as well if i do a wildcard query it seems to work as well.
The text was updated successfully, but these errors were encountered: