小编典典

Elasticsearch-设置max_clause_count

elasticsearch

我在elasticsearch中有一个很大的术语查询,所以我得到 too_many_clauses: maxClauseCount is set to 1024

我试图通过在elasticsearch.yml中增加它

index:
query:
bool:
max_clause_count: 10240

和通过

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

但没有任何效果。我的索引名为塑料。


阅读 3075

收藏
2020-06-22

共1个答案

小编典典

背景

注意: 此答案中给出的建议仅适用于5.5以下的Elasticsearch版本。所描述的方法引用的属性最终在5.5中被删除。

搜索设置

该设置index.query.bool.max_clause_count已被删除。为了设置最大数目的布尔子句,
indices.query.bool.max_clause_count应改为使用。


原始答案

添加以下内容:

index.query.bool.max_clause_count: 10240

elasticsearch.yml当然,要对群集中每个节点上的文件重新启动节点(配置文件中的任何更改都需要重新启动)。

2020-06-22