Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elasticsearch - set max_clause_count

I have a pretty big terms query in elasticsearch, so I get too_many_clauses: maxClauseCount is set to 1024

I tried increasing it in the elasticsearch.yml by

index:
query:
bool:
max_clause_count: 10240

and via

curl -XPUT "http://localhost:9200/plastic/_settings" -d '{ "index" : { "max_clause_count" : 10000 } }'

but nothing worked. My index is named plastic.

like image 882
Evo_x Avatar asked Oct 27 '16 03:10

Evo_x


1 Answers

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.

like image 189
puma Avatar answered Sep 23 '22 02:09

puma