# Search.max\_buckets

**URL:** <https://discuss.elastic.co/t/search-max-buckets/354910>\
**Category:** Elasticsearch\
**Created:** [March 7, 2024, 6:47am UTC](https://discuss.elastic.co/t/search-max-buckets/354910 "2024-03-07T06:47:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frances\_Chu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/frances_chu/32/127298_2.png) [@Frances\_Chu](https://discuss.elastic.co/u/Frances_Chu)\
**Post date:** [March 7, 2024, 6:47am UTC](https://discuss.elastic.co/t/search-max-buckets/354910/1 "2024-03-07T06:47:24Z")

</div>

My cluster's setting is

```auto
{
  "defaults": {
    "search": {
      "max_buckets": "65536"
    }
  }
}

```

Trying to perform query it compliant ...the number of buckets was exceeded.

1. In order to make the query work, is enlarget the max\_buckets the only solution to this?

2. Is it possible to change the setting per index?

3. If it is must to enlarget the cluster wide setting of max\_buckets, what is the best pratice to set the value....it depend on system memory? Jvm settings? or what else? Is there any formula to calculate the best value of the system?

---

<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:** [April 4, 2024, 6:48am UTC](https://discuss.elastic.co/t/search-max-buckets/354910/2 "2024-04-04T06:48:01Z")

</div>

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