The ES query found 1024 elements and reported errors

Errors are reported as follows:

Caused by: too_many_clauses: maxClauseCount is set to 1024

Cause: in the in query of ES, the IDS in the in are greater than 1024, resulting in ES error. The default number of elements supported by ES is 1024


Edit elasticsearch.yml and add the following configuration:


index.query.bool.max_clause_count: 10240

An error is reported in the new version. The configuration item name has been modified. The following fields need to be added:

indices.query.bool.max_clause_count: 300000


Note YML syntax: there is a space after the colon

Similar Posts: