Help Center/ Cloud Search Service/ FAQs/ Managing CSS Clusters/ How Do I Set search.max_buckets for a CSS Cluster?
Updated on 2026-10-29 GMT+08:00

How Do I Set search.max_buckets for a CSS Cluster?

The default maximum number of buckets allowed in an aggregation operation for a CSS Elasticsearch and OpenSearch cluster is 10,000 for versions earlier than Elasticsearch 7.9.3, and 65,535 for Elasticsearch 7.9.3 and later as well as OpenSearch clusters.

To return more buckets than the default maximum allowed in an aggregation operation, you can increase the value of search.max_buckets.

Increasing the value of search.max_buckets will increase the cluster's load and memory usage. Exercise caution.

Run the following command on the Dev Tools page of Kibana (for Elasticsearch clusters) or OpenSearch Dashboards (for OpenSearch clusters):
PUT _cluster/settings
{
    "persistent": {
        "search.max_buckets": 70000
    }
}