I recently upgraded Elasticsearch from version 7.5.1 to 8.0.1, and I encountered an issue with my queries that require around 20k boolean clauses. In Elasticsearch 7, I manually updated the persistent settings to increase the max_bool_clause_count value to allow for this. However, I noticed that in version 8.0.1, the max_bool_clause_count setting has been deprecated.
I tried updating the max_clause_count, but it didn't reflect as its deprecated. Is there a recommended way to achieve the same result in Elasticsearch 8.0.1 without relying on deprecated settings? Can I configure this limit using any other method or is there an alternative approach to handling large boolean queries?
I recently upgraded Elasticsearch from version 7.5.1 to 8.0.1, and I encountered an issue with my queries that require around 20k boolean clauses. In Elasticsearch 7, I manually updated the persistent settings to increase the max_bool_clause_count value to allow for this. However, I noticed that in version 8.0.1, the max_bool_clause_count setting has been deprecated.
I tried updating the max_clause_count, but it didn't reflect as its deprecated. Is there a recommended way to achieve the same result in Elasticsearch 8.0.1 without relying on deprecated settings? Can I configure this limit using any other method or is there an alternative approach to handling large boolean queries?
Share Improve this question asked Nov 18, 2024 at 10:54 Sahil KapoorSahil Kapoor 112 bronze badges1 Answer
Reset to default 0The official documentation states:
Elasticsearch will now dynamically set the maximum number of allowed clauses in a query, using a heuristic based on the size of the search thread pool and the size of the heap allocated to the JVM. This limit has a minimum value of 1024 and will in most cases be larger (for example, a node with 30Gb RAM and 48 CPUs will have a maximum clause count of around 27,000). Larger heaps lead to higher values, and larger thread pools result in lower values.
So it does not seems like you have a way to do what you want with a setting.