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.
PUT _cluster/settings
{
"persistent": {
"search.max_buckets": 70000
}
}