# Search.max\_buckets setting in ES 6.7 - The expected behavior

**URL:** <https://discuss.elastic.co/t/search-max-buckets-setting-in-es-6-7-the-expected-behavior/214488>\
**Category:** Elasticsearch\
**Created:** [January 9, 2020, 8:18pm UTC](https://discuss.elastic.co/t/search-max-buckets-setting-in-es-6-7-the-expected-behavior/214488 "2020-01-09T20:18:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![musfiqur](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@musfiqur](https://discuss.elastic.co/u/musfiqur)\
**Post date:** [January 9, 2020, 8:18pm UTC](https://discuss.elastic.co/t/search-max-buckets-setting-in-es-6-7-the-expected-behavior/214488/1 "2020-01-09T20:18:29Z")

</div>

Hi,  
We are on **ES 6.7**. We previously did not set search.max\_buckets. After having some recent cluster outage, we are leaning towards introducing some limits. One of them is search.max\_buckets.  
I was reading the below documents:  
[https://www.elastic.co/guide/en/elasticsearch/reference/6.7/search-aggregations-bucket.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.7/search-aggregations-bucket.html)  
The maximum number of buckets allowed in a single response is limited by a dynamic cluster setting named `search.max_buckets`. We are planning to set it to 1000. However, we are afraid that this may break some customer who have \>1000 buckets. We are doing an impact study. Are they going to get only 1000 buckets or they are going to get an exception? In 7.x , we know that they are getting an exception. What about 6.7?  
-Musfiqur

---

<div class="post-metadata">

**Author:** ![jimczi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jimczi/32/47985_2.png) [@jimczi](https://discuss.elastic.co/u/jimczi)\
**Post date:** [January 10, 2020, 8:47am UTC](https://discuss.elastic.co/t/search-max-buckets-setting-in-es-6-7-the-expected-behavior/214488/2 "2020-01-10T08:47:09Z")

</div>

> What about 6.7?

Any request that tries to create more than `search.max_buckets` will throw an exception so same behavior as in 7.x.

---

<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:** [February 7, 2020, 8:47am UTC](https://discuss.elastic.co/t/search-max-buckets-setting-in-es-6-7-the-expected-behavior/214488/3 "2020-02-07T08:47:18Z")

</div>

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