# How to find optimal value for setting search.max\_buckets

**URL:** <https://discuss.elastic.co/t/how-to-find-optimal-value-for-setting-search-max-buckets/145665>\
**Category:** Elasticsearch\
**Created:** [August 23, 2018, 6:46am UTC](https://discuss.elastic.co/t/how-to-find-optimal-value-for-setting-search-max-buckets/145665 "2018-08-23T06:46:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ishantanu](https://avatars.discourse-cdn.com/v4/letter/i/da6949/32.png) [@ishantanu](https://discuss.elastic.co/u/ishantanu)\
**Post date:** [August 23, 2018, 6:46am UTC](https://discuss.elastic.co/t/how-to-find-optimal-value-for-setting-search-max-buckets/145665/1 "2018-08-23T06:46:23Z")

</div>

Hi,

I am recently facing an issue for a visualization (visual builder) which use "Max" aggregation on a numeric field whose result is them grouped by another field.

Now, when I group the aggregation by everything, I can see the results. Whereas when I try by grouping the result with another field, then the visualization doesn't show any data.

I suspect this issue is related to `setting search.max_buckets` value. Reason: I have the same visualization in two different kibana instances and the ES source is same. One is self hosted and another is on Elastic cloud. The ones on Elastic cloud is causing the issue. I tried to increase the `search.max_buckets` value from 10000 to 100000 but it didn't work.

---

<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:** [September 20, 2018, 6:46am UTC](https://discuss.elastic.co/t/how-to-find-optimal-value-for-setting-search-max-buckets/145665/2 "2018-09-20T06:46:30Z")

</div>

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