Skip to content
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 (#55158) #55661

Merged
merged 2 commits into from
May 14, 2020

Conversation

cbuescher
Copy link
Member

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

…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 cbuescher force-pushed the backport-55158-7-7 branch from 86ce04c to 759305c Compare April 23, 2020 11:08
@cbuescher cbuescher merged commit 209d9ad into elastic:7.7 May 14, 2020
@cbuescher cbuescher added v7.7.1 and removed v7.7.0 labels May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants