From 4c5f2e4a0576a7c99fec1e0a831900c59b085182 Mon Sep 17 00:00:00 2001 From: Dimitri Koutsos Date: Wed, 26 May 2021 21:10:07 +0200 Subject: [PATCH] Update bucket.asciidoc (#73306) Explains the discrepancy in behavior between bucket aggregation and composite aggregations in handling -1 in `search.max_buckets` settings. --- docs/reference/aggregations/bucket.asciidoc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/reference/aggregations/bucket.asciidoc b/docs/reference/aggregations/bucket.asciidoc index 786c37ce16e7..22445fcd9773 100644 --- a/docs/reference/aggregations/bucket.asciidoc +++ b/docs/reference/aggregations/bucket.asciidoc @@ -15,7 +15,10 @@ define fixed number of multiple buckets, and others dynamically create the bucke NOTE: The maximum number of buckets allowed in a single response is limited by a dynamic cluster setting named `search.max_buckets`. It is disabled by default (-1) but requests that try to return more than -10,000 buckets (the default value for future versions) will log a deprecation warning. +10,000 buckets (the default value for future versions) will log a deprecation warning. +When using composite aggs however, the handling of -1 differs. Elasticsearch would use the soft limit as a +hard limit for those aggregations, and raise a `TooManyBucketsException` +about `Trying to create too many buckets. Must be less than or equal to: [10000]` if the soft limit is exceeded. include::bucket/adjacency-matrix-aggregation.asciidoc[]