Elasticsearch - set max_clause_count

后端 未结 4 1666
名媛妹妹
名媛妹妹 2020-12-06 01:43

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

I tried increasing it in the elasticsearch.y

4条回答
  •  醉梦人生
    2020-12-06 02:34

    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.

    Search Settings

    The setting index.query.bool.max_clause_count has been removed. In order to set the maximum number of boolean clauses indices.query.bool.max_clause_count should be used instead.

    • Ref - Breaking changes in 5.0 » Settings changes

    Original Answer

    Add the following:

    index.query.bool.max_clause_count: 10240
    

    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).

提交回复
热议问题