| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 | [[search-aggregations-bucket]]== Bucket AggregationsBucket aggregations don't calculate metrics over fields like the metrics aggregations do, but instead, they createbuckets of documents. Each bucket is associated with a criterion (depending on the aggregation type) which determineswhether or not a document in the current context "falls" into it. In other words, the buckets effectively define documentsets. In addition to the buckets themselves, the `bucket` aggregations also compute and return the number of documentsthat "fell into" each bucket.Bucket aggregations, as opposed to `metrics` aggregations, can hold sub-aggregations. These sub-aggregations will beaggregated for the buckets created by their "parent" bucket aggregation.There are different bucket aggregators, each with a different "bucketing" strategy. Some define a single bucket, somedefine fixed number of multiple buckets, and others dynamically create the buckets during the aggregation process.NOTE: The maximum number of buckets allowed in a single response is limited by a dynamic clustersetting named `search.max_buckets`. It defaults to 10,000, requests that try to return more thanthe limit will fail with an exception.include::bucket/adjacency-matrix-aggregation.asciidoc[]include::bucket/autodatehistogram-aggregation.asciidoc[]include::bucket/children-aggregation.asciidoc[]include::bucket/composite-aggregation.asciidoc[]include::bucket/datehistogram-aggregation.asciidoc[]include::bucket/daterange-aggregation.asciidoc[]include::bucket/diversified-sampler-aggregation.asciidoc[]include::bucket/filter-aggregation.asciidoc[]include::bucket/filters-aggregation.asciidoc[]include::bucket/geodistance-aggregation.asciidoc[]include::bucket/geohashgrid-aggregation.asciidoc[]include::bucket/geotilegrid-aggregation.asciidoc[]include::bucket/global-aggregation.asciidoc[]include::bucket/histogram-aggregation.asciidoc[]include::bucket/iprange-aggregation.asciidoc[]include::bucket/missing-aggregation.asciidoc[]include::bucket/nested-aggregation.asciidoc[]include::bucket/parent-aggregation.asciidoc[]include::bucket/range-aggregation.asciidoc[]include::bucket/reverse-nested-aggregation.asciidoc[]include::bucket/sampler-aggregation.asciidoc[]include::bucket/significantterms-aggregation.asciidoc[]include::bucket/significanttext-aggregation.asciidoc[]include::bucket/terms-aggregation.asciidoc[]
 |