Aggregation exception

This aggregation creates too many buckets (10001) and will throw an error in future versions. You should update the [search.max_buckets] cluster setting or use the [
composite] aggregation to paginate all buckets in multiple requests.

We are using 6.2.2 version. Let us know what steps we should be doing to get away from this issue.

1 Like

You can update the setting, refer to https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket.html

PUT /_cluster/settings?flat_settings=true {
"transient" : {
    "search.max_buckets" : "100000"
   }
}

or using partitions in your query (I guess you are using Rest client ? )

  "aggs": {
"msisdn": {
  "terms": {
    "field": "bucket_term",
    "include": {
           "partition": 0,
           "num_partitions": 100
        },
    "size": 100000,
    "order": {
      "field_name": "desc"
    }
  }
1 Like

thanks for your suggestion, will try this out.

Much can depend on what you are sorting by and data volumes.

This wizard I've been sketching out may help guide you to the right solution.

this helps. thank you !

1 Like

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