-
Notifications
You must be signed in to change notification settings - Fork 25.6k
indices.query.bool.max_clause_count now limits all query clauses
#75297
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
Conversation
In the upcoming Lucene 9 release, `indices.query.bool.max_clause_count` is going to apply to the entire query tree rather than per `bool` query. In order to avoid breaks, the limit has been bumped from 1024 to 4096. The semantics will effectively change when we upgrade to Lucene 9, this PR is only about agreeing on a migration strategy and documenting this change. To avoid further breaks, I am leaning towards keeping the current setting name even though it contains `bool`. I believe that it still makes sense given that `bool` queries are typically the main contributors to high numbers of clauses.
|
Pinging @elastic/es-search (Team:Search) |
romseygeek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I have a couple of questions.
| public class SearchModule { | ||
| public static final Setting<Integer> INDICES_MAX_CLAUSE_COUNT_SETTING = Setting.intSetting("indices.query.bool.max_clause_count", | ||
| 1024, 1, Integer.MAX_VALUE, Setting.Property.NodeScope); | ||
| 2048, 1, Integer.MAX_VALUE, Setting.Property.NodeScope); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be 4096?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went back and forth between 2048 and 4096, thanks for catching!
| from becoming too large, and taking up too much CPU and memory. In case you're considering | ||
| increasing this setting, make sure you've exhausted all other options to avoid having to do this. | ||
| Higher values can lead to performance degradations and memory issues, especially in clusters with | ||
| a high load or few resources. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it's worth mentioning terms queries and index_prefix settings here as well?
jrodewig
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
indices.query.bool.max_clause_count.indices.query.bool.max_clause_count now limits all query clauses
They are due to changes to `indices.query.bool.max_clause_count` that got pushed in elastic#75297. Closes elastic#75591 Closes elastic#75592
…lastic#75297) In the upcoming Lucene 9 release, `indices.query.bool.max_clause_count` is going to apply to the entire query tree rather than per `bool` query. In order to avoid breaks, the limit has been bumped from 1024 to 4096. The semantics will effectively change when we upgrade to Lucene 9, this PR is only about agreeing on a migration strategy and documenting this change. To avoid further breaks, I am leaning towards keeping the current setting name even though it contains `bool`. I believe that it still makes sense given that `bool` queries are typically the main contributors to high numbers of clauses. Co-authored-by: James Rodewig <[email protected]>
They are due to changes to `indices.query.bool.max_clause_count` that got pushed in elastic#75297. Closes elastic#75591 Closes elastic#75592
In the upcoming Lucene 9 release,
indices.query.bool.max_clause_countisgoing to apply to the entire query tree rather than per
boolquery. In orderto avoid breaks, the limit has been bumped from 1024 to 4096.
The semantics will effectively change when we upgrade to Lucene 9, this PR
is only about agreeing on a migration strategy and documenting this change.
To avoid further breaks, I am leaning towards keeping the current setting name
even though it contains
bool. I believe that it still makes sense given thatboolqueries are typically the main contributors to high numbers of clauses.