Weird maxclausecount issue

Hi,

I have an issue with the maxclausecount. I made changes to config file elasticsearch.yml and when i check with curl command i get the following (see code) It states "max_clause_count" : "4092" but when i do a search in my shop (query: ''vitamin c", i get the message "too_many_clauses","reason":"maxClauseCount is set to 1024". I already restarted the service.

Why keeps it stating 1024?

{
"cluster_name" : "elasticsearch",
"nodes" : {
"lNuCsaHGTUq5leoieXeGvQ" : {
"name" : "Hero",
"transport_address" : "localhost/127.0.0.1:9300",
"host" : "127.0.0.1",
"ip" : "127.0.0.1",
"version" : "2.1.1",
"build" : "40e2c53",
"http_address" : "localhost/127.0.0.1:9200",
"settings" : {
"max_clause_count" : "4092",
"client" : {
"type" : "node"
},
"name" : "Hero",
"pidfile" : "/var/run/elasticsearch/elasticsearch.pid",
"path" : {
"data" : "/var/lib/elasticsearch",
"home" : "/usr/share/elasticsearch",
"conf" : "/etc/elasticsearch",
"logs" : "/var/log/elasticsearch"
},
"config" : {
"ignore_system_properties" : "true"
},
"cluster" : {
"name" : "elasticsearch"
},
"network" : {
"host" : "localhost"
},
"foreground" : "false"
}
}
}
}

The setting's name is index.query.bool.max_clause_count

Beside this, I do not recommend changing this limit to such a high value.

1 Like

Thank for the message

Is the option: index.query.bool.max_clause_count standard in the elasticsearch.yml config file or do i have to add it myself?

We have 65k products per index. What value is resonable for searches including 1 character like "vitamin c"?

Use the default value.

Fix your query.

The key name is indices.query.bool.max_clause_count