# Weird maxclausecount issue

**URL:** https://discuss.elastic.co/t/weird-maxclausecount-issue/42237
**Category:** Elasticsearch
**Created:** [February 19, 2016, 12:20pm UTC](https://discuss.elastic.co/t/weird-maxclausecount-issue/42237 "2016-02-19T12:20:03Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![genieprogg](https://avatars.discourse-cdn.com/v4/letter/g/0ea827/32.png) [@genieprogg](https://discuss.elastic.co/u/genieprogg)
#### Post date: [February 19, 2016, 12:20pm UTC](https://discuss.elastic.co/t/weird-maxclausecount-issue/42237/1 "2016-02-19T12:20:03Z")

</div>

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"  
}  
}  
}  
}

---

<div class="post-metadata">

### Author: ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)
#### Post date: [February 19, 2016, 1:30pm UTC](https://discuss.elastic.co/t/weird-maxclausecount-issue/42237/2 "2016-02-19T13:30:39Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![genieprogg](https://avatars.discourse-cdn.com/v4/letter/g/0ea827/32.png) [@genieprogg](https://discuss.elastic.co/u/genieprogg)
#### Post date: [February 19, 2016, 1:40pm UTC](https://discuss.elastic.co/t/weird-maxclausecount-issue/42237/3 "2016-02-19T13:40:05Z")

</div>

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"?

---

<div class="post-metadata">

### Author: ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)
#### Post date: [February 19, 2016, 2:03pm UTC](https://discuss.elastic.co/t/weird-maxclausecount-issue/42237/4 "2016-02-19T14:03:08Z")

</div>

Use the default value.

Fix your query.

---

<div class="post-metadata">

### Author: ![venkata\_sreekanth\_bh](https://avatars.discourse-cdn.com/v4/letter/v/65b543/32.png) [@venkata\_sreekanth\_bh](https://discuss.elastic.co/u/venkata_sreekanth_bh)
#### Post date: [March 24, 2017, 7:27pm UTC](https://discuss.elastic.co/t/weird-maxclausecount-issue/42237/5 "2017-03-24T19:27:04Z")

</div>

The key name is indices.query.bool.max\_clause\_count

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 5, 2017, 10:01pm UTC](https://discuss.elastic.co/t/weird-maxclausecount-issue/42237/6 "2017-07-05T22:01:54Z")

</div>


