Elasticsearch-设置max_clause_count [英] Elasticsearch - set max_clause_count

查看:1205
本文介绍了Elasticsearch-设置max_clause_count的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在elasticsearch中有一个很大的术语查询,所以我得到
too_many_clauses:maxClauseCount设置为1024

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

我尝试在elasticsearch.yml中将其增加

I tried increasing it in the elasticsearch.yml by

index:
query:
bool:
max_clause_count: 10240

并通过

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

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

but nothing worked. My index is named plastic.

推荐答案

背景



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

Background

NOTE: The advice given in this answer only applies to versions of Elasticsearch below 5.5. The method described references a property that was eventually removed in 5.5.


搜索设置



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




  • 参考-5.0中的重大更改»设置更改

    • Ref - Breaking changes in 5.0 » Settings changes
    • 添加以下内容:

      index.query.bool.max_clause_count: 10240
      

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

      To the file elasticsearch.yml on each node of the cluster, then of course, restart the nodes (any change in the config file needs a restart).

      这篇关于Elasticsearch-设置max_clause_count的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆