# Does the max\_clause\_count parameter affect the number of values in a terms clause?

**URL:** <https://discuss.elastic.co/t/does-the-max-clause-count-parameter-affect-the-number-of-values-in-a-terms-clause/99340>\
**Category:** Elasticsearch\
**Created:** [September 4, 2017, 5:56pm UTC](https://discuss.elastic.co/t/does-the-max-clause-count-parameter-affect-the-number-of-values-in-a-terms-clause/99340 "2017-09-04T17:56:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cterron](https://avatars.discourse-cdn.com/v4/letter/c/ccd318/32.png) [@cterron](https://discuss.elastic.co/u/cterron)\
**Post date:** [September 4, 2017, 5:56pm UTC](https://discuss.elastic.co/t/does-the-max-clause-count-parameter-affect-the-number-of-values-in-a-terms-clause/99340/1 "2017-09-04T17:56:32Z")

</div>

Hi all

I'm using ElasticSearh 2.3.2 - I know, EOL this September -, with a query like this:

```
{
        "query":{
            "bool":{
                "should":[
                    { "terms": {"id": ["cafe-babe-0000","cafe-babe-0001","cafe-babe-0002","cafe-babe-0003","cafe-babe-0004","cafe-babe-0005","cafe-babe-0006","cafe-babe-0007","cafe-babe-0008"]}}
                ] 
            }
        }
}

```

So, Can I use more than 1024 values in the terms array? After testing, I've seen that ES launch an exception in there are more than 1024 values in the array?. Is it these correct?

I thought that the max\_clause\_count parameter only affected the number of clauses in the query and not the number of values.

---

<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:** [October 2, 2017, 5:56pm UTC](https://discuss.elastic.co/t/does-the-max-clause-count-parameter-affect-the-number-of-values-in-a-terms-clause/99340/2 "2017-10-02T17:56:38Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
