在 Elasticsearch中设置 BooleanQuery maxClauseCount
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/liyantianmin/article/details/64926881
如果bool查询的查询条件过多会导致
TooManyClauses问题:
-
"caused_by":{"type":"too_many_clauses","reason":"maxClauseCount is set to 1024"}}}],
-
"caused_by":{"type":"query_shard_exception","reason":"failed to create query:
解决方式在配置文件 Elasticsearch.yuml中配置
index.query.bool.max_clause_count: 10240
设置最大限制bool查询的条数。过多会导致性能比较慢。