-
Notifications
You must be signed in to change notification settings - Fork 24.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
simple_query_string with fields: ["*"] can result in an error #39577
Comments
Pinging @elastic/es-search |
I had a discussion with @jakelandis about this one. The confusion comes from the fact that we recommend using The other inconsistency is that we automatically set |
Retested example above with
👍 |
We discussed this issue internally and agreed that we should solve the discrepancy by setting lenient to true automatically when all fields are targeted in these queries (no matter if it's set in |
Allow for SimpleQueryString, QueryString and MultiMatchQuery to set the `fields` parameter to the wildcard `*`. If so, set the leniency to `true`, to achieve the same behaviour as from the `"default_field" : "*" setting. Closes: elastic#39577
Allow for SimpleQueryString, QueryString and MultiMatchQuery to set the `fields` parameter to the wildcard `*`. If so, set the leniency to `true`, to achieve the same behaviour as from the `"default_field" : "*" setting. Furthermore, check if `*` is in the list of the `default_field` but not necessarily as the 1st element. Closes: #39577
Allow for SimpleQueryString, QueryString and MultiMatchQuery to set the `fields` parameter to the wildcard `*`. If so, set the leniency to `true`, to achieve the same behaviour as from the `"default_field" : "*" setting. Furthermore, check if `*` is in the list of the `default_field` but not necessarily as the 1st element. Closes: #39577 (cherry picked from commit e75ff0c)
Backported to |
Allow for SimpleQueryString, QueryString and MultiMatchQuery to set the `fields` parameter to the wildcard `*`. If so, set the leniency to `true`, to achieve the same behaviour as from the `"default_field" : "*" setting. Furthermore, check if `*` is in the list of the `default_field` but not necessarily as the 1st element. Closes: elastic#39577
Reproduction:
Results in
This is a contrived example from a more complex query.
The underlying error makes sense, but the doc states "will never throw an exception, and discards invalid parts of the query" , and not sure if this qualifies an invalid part of the query.
The query works if you simply remove
"fields": ["*"]
, so there is a simple workaround, but then you are implicitly depending onindex.query.default_field
which may not be what you want.The text was updated successfully, but these errors were encountered: