Too_many_clauses: maxClauseCount is set to 1024 & index.query.bool.max_clause_count

#1

Hello World!

I'm running into following error:

  {
    "type": "too_many_clauses",
    "reason": "too_many_clauses: maxClauseCount is set to 1024"
  },

I found index.query.bool.max_clause_count needs to be tweaked.

Is there a way to tweak value without restarting elasticsearch?

Please advise.

(Igor Motov) #2

Which version of elasticsearch are you using?

#3

6.7.2

(Igor Motov) #4

In this case you should use indices.query.bool.max_clause_count instead. This setting is not dynamic and you should be very careful in using it. This limit there for the reason and you should try to tweak your query first instead of tweaking the query. For more information see https://www.elastic.co/guide/en/elasticsearch/reference/6.7/search-settings.html