ES
在查询 Elasticseach 时,报错:
too_many_clauses: maxClauseCount is set to 1024
原因是:
1、查询的 bool 查询条件过多
2、查询的 bool 查询字符过多
解决方法:
1、拆分 bool 查询,改为多个小 bool 组合查询的方式
或者
2、在 elasticsearch.yml 配置中调大对 bool 的限制,修改方式如下:
对 Elasticsearch 5.0 以下的版本:
index.query.bool.max_clause_count: 10240
对 Elasticsearch 5.0 以上的版本:
indices.query.bool.max_clause_count: 10240
修改配置后,重启ES即可正常。



