Elasticsearch - set max_clause_count
this can also be achieved by updating configuration inside elasticsearch.yml file (inside config folder of elastic installation)
indices.query.bool.max_clause_count:4096
In Elasticsearch 5, index.query.bool.max_clause_count
has been deprecated/removed.
Insert in your elasticsearch.yml
file indices.query.bool.max_clause_count : n
instead (where n - new supported number of clauses).
NOTE: Here is link to documentation.
Background
NOTE: The advice given in this answer only applies to versions of Elasticsearch below 5.5. The method described references a property that was eventually removed in 5.5.
Search Settings
The setting
index.query.bool.max_clause_count
has been removed. In order to set the maximum number of boolean clausesindices.query.bool.max_clause_count
should be used instead.
- Ref - Breaking changes in 5.0 » Settings changes
Original Answer
Add the following:
index.query.bool.max_clause_count: 10240
To the file elasticsearch.yml
on each node of the cluster, then of course, restart the nodes (any change in the config file needs a restart).