-
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
Don't expand default_field in query_string before required #53789
Labels
Comments
timroes
added
the
:Search/Search
Search-related issues that do not fall into other categories
label
Mar 19, 2020
Pinging @elastic/es-search (:Search/Search) |
cbuescher
pushed a commit
to cbuescher/elasticsearch
that referenced
this issue
Apr 14, 2020
Currently QueryStringQueryParser already checks if the field limit is breached at construction time, which e.g. leads to errors if the default field is set to "*" or the default is used and there are more fields than the limit, even if the query itself does not use all these fields. This change moves this check to happen after query parsing. QueryStringQueryParser now keeps track of the fields that are actually resolved while parsing. The size of that set is later used to check against the limit set by the `indices.query.bool.max_clause_count` setting. Closes elastic#53789
cbuescher
pushed a commit
that referenced
this issue
Apr 23, 2020
Currently QueryStringQueryParser already checks if the field limit is breached at construction time, which e.g. leads to errors if the default field is set to "*" or the default isn't used and there are more fields than the limit, even if the query itself does not use all these fields. This change moves this check to happen after query parsing. QueryStringQueryParser now keeps track of the fields that are actually resolved while parsing. The size of that set is later used to check against the limit set by the `indices.query.bool.max_clause_count` setting. Closes #53789
cbuescher
pushed a commit
to cbuescher/elasticsearch
that referenced
this issue
Apr 23, 2020
…5158) Currently QueryStringQueryParser already checks if the field limit is breached at construction time, which e.g. leads to errors if the default field is set to "*" or the default isn't used and there are more fields than the limit, even if the query itself does not use all these fields. This change moves this check to happen after query parsing. QueryStringQueryParser now keeps track of the fields that are actually resolved while parsing. The size of that set is later used to check against the limit set by the `indices.query.bool.max_clause_count` setting. Closes elastic#53789
cbuescher
pushed a commit
to cbuescher/elasticsearch
that referenced
this issue
Apr 23, 2020
…5158) Currently QueryStringQueryParser already checks if the field limit is breached at construction time, which e.g. leads to errors if the default field is set to "*" or the default isn't used and there are more fields than the limit, even if the query itself does not use all these fields. This change moves this check to happen after query parsing. QueryStringQueryParser now keeps track of the fields that are actually resolved while parsing. The size of that set is later used to check against the limit set by the `indices.query.bool.max_clause_count` setting. Closes elastic#53789
cbuescher
pushed a commit
that referenced
this issue
May 14, 2020
…55661) Currently QueryStringQueryParser already checks if the field limit is breached at construction time, which e.g. leads to errors if the default field is set to "*" or the default isn't used and there are more fields than the limit, even if the query itself does not use all these fields. This change moves this check to happen after query parsing. QueryStringQueryParser now keeps track of the fields that are actually resolved while parsing. The size of that set is later used to check against the limit set by the `indices.query.bool.max_clause_count` setting. Backport of #55158 Closes #53789
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
ES version: 7.6.1
Elasticsearch currently expands the
default_field
in aquery_string
query before it's actually needed. So with adefault_field: '*'
and an index pattern, that has too many fields, you might run into thefield expansion matches too many fields, limit: 1024, got: 1089
error, even if the query, actually does not have any part in it, that would require thedefault_field
(because all parts of the query specify a field explicitly).Suggestion: We should not try to expand the
default_field
before we're not seeing the first part of the query, that actually not has a field in it, and would require that value.The text was updated successfully, but these errors were encountered: