# Bucket aggregation

**URL:** https://discuss.elastic.co/t/bucket-aggregation/304271
**Category:** Kibana
**Created:** [May 9, 2022, 4:12pm UTC](https://discuss.elastic.co/t/bucket-aggregation/304271 "2022-05-09T16:12:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![meyer1](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@meyer1](https://discuss.elastic.co/u/meyer1)
#### Post date: [May 9, 2022, 4:12pm UTC](https://discuss.elastic.co/t/bucket-aggregation/304271/1 "2022-05-09T16:12:51Z")

</div>

Hello everyone, I have a short question for you.

Currently I am trying to make an aggregation request for a table visualization. Except that I am limited to 65000 bucket or so (by default I believe according to the error I currently have)

I know that it is possible to increase this limit and I think that given my request it can be counted in millions.

In my case, what will happen if I increase the "search.max\_buckets" parameter?

Do you have any advice to give me ?

thank you for your future answers

---

<div class="post-metadata">

### Author: ![LizaD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lizad/32/51074_2.png) [@LizaD](https://discuss.elastic.co/u/LizaD)
#### Post date: [May 9, 2022, 6:33pm UTC](https://discuss.elastic.co/t/bucket-aggregation/304271/2 "2022-05-09T18:33:07Z")

</div>

Hi @meyer1 yes, you can increase this number according to:

> **[Search settings | Elasticsearch Guide \[8.2\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-settings.html#search-settings-max-buckets)**

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [May 10, 2022, 1:38am UTC](https://discuss.elastic.co/t/bucket-aggregation/304271/3 "2022-05-10T01:38:08Z")

</div>

> [@meyer1](#):
>
> In my case, what will happen if I increase the "search.max\_buckets" parameter?

Basically it becomes more expensive to run to calculate each bucket, which is why that limit is in place.

> [@meyer1](#):
>
> I know that it is possible to increase this limit and I think that given my request it can be counted in millions.

You will probably hit a circuit breaker in Elasticsearch that will stop you from OOMing your node(s), but be careful increasing this to millions.

If you need to do this, you may want to rethink your approach.

---

<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: [June 7, 2022, 1:38am UTC](https://discuss.elastic.co/t/bucket-aggregation/304271/4 "2022-06-07T01:38:39Z")

</div>

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