2015-05-01 16:04:55 -04:00
|
|
|
[[search-aggregations-bucket]]
|
|
|
|
== Bucket Aggregations
|
|
|
|
|
|
|
|
Bucket aggregations don't calculate metrics over fields like the metrics aggregations do, but instead, they create
|
|
|
|
buckets of documents. Each bucket is associated with a criterion (depending on the aggregation type) which determines
|
|
|
|
whether or not a document in the current context "falls" into it. In other words, the buckets effectively define document
|
|
|
|
sets. In addition to the buckets themselves, the `bucket` aggregations also compute and return the number of documents
|
2016-04-21 10:16:45 -04:00
|
|
|
that "fell into" each bucket.
|
2015-05-01 16:04:55 -04:00
|
|
|
|
|
|
|
Bucket aggregations, as opposed to `metrics` aggregations, can hold sub-aggregations. These sub-aggregations will be
|
|
|
|
aggregated 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, some
|
|
|
|
define fixed number of multiple buckets, and others dynamically create the buckets during the aggregation process.
|
|
|
|
|
2017-12-06 03:15:28 -05:00
|
|
|
NOTE: The maximum number of buckets allowed in a single response is limited by a dynamic cluster
|
|
|
|
setting named `search.max_buckets`. It defaults to 10,000, requests that try to return more than
|
|
|
|
the limit will fail with an exception.
|
|
|
|
|
2017-01-23 05:18:30 -05:00
|
|
|
include::bucket/adjacency-matrix-aggregation.asciidoc[]
|
2018-07-13 13:08:35 -04:00
|
|
|
|
|
|
|
include::bucket/autodatehistogram-aggregation.asciidoc[]
|
2017-01-23 05:18:30 -05:00
|
|
|
|
2015-05-01 16:04:55 -04:00
|
|
|
include::bucket/children-aggregation.asciidoc[]
|
|
|
|
|
2018-02-02 03:24:10 -05:00
|
|
|
include::bucket/composite-aggregation.asciidoc[]
|
|
|
|
|
2015-05-01 16:04:55 -04:00
|
|
|
include::bucket/datehistogram-aggregation.asciidoc[]
|
|
|
|
|
|
|
|
include::bucket/daterange-aggregation.asciidoc[]
|
|
|
|
|
2015-12-14 06:54:41 -05:00
|
|
|
include::bucket/diversified-sampler-aggregation.asciidoc[]
|
|
|
|
|
2015-05-01 16:04:55 -04:00
|
|
|
include::bucket/filter-aggregation.asciidoc[]
|
|
|
|
|
|
|
|
include::bucket/filters-aggregation.asciidoc[]
|
|
|
|
|
|
|
|
include::bucket/geodistance-aggregation.asciidoc[]
|
|
|
|
|
|
|
|
include::bucket/geohashgrid-aggregation.asciidoc[]
|
|
|
|
|
2019-02-08 12:40:53 -05:00
|
|
|
include::bucket/geotilegrid-aggregation.asciidoc[]
|
|
|
|
|
2015-05-01 16:04:55 -04:00
|
|
|
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[]
|
|
|
|
|
2018-11-08 08:13:00 -05:00
|
|
|
include::bucket/parent-aggregation.asciidoc[]
|
|
|
|
|
2015-05-01 16:04:55 -04:00
|
|
|
include::bucket/range-aggregation.asciidoc[]
|
|
|
|
|
2019-07-02 13:10:46 -04:00
|
|
|
include::bucket/rare-terms-aggregation.asciidoc[]
|
|
|
|
|
2015-05-01 16:04:55 -04:00
|
|
|
include::bucket/reverse-nested-aggregation.asciidoc[]
|
|
|
|
|
|
|
|
include::bucket/sampler-aggregation.asciidoc[]
|
|
|
|
|
|
|
|
include::bucket/significantterms-aggregation.asciidoc[]
|
|
|
|
|
2017-05-24 08:46:43 -04:00
|
|
|
include::bucket/significanttext-aggregation.asciidoc[]
|
|
|
|
|
2015-05-01 16:04:55 -04:00
|
|
|
include::bucket/terms-aggregation.asciidoc[]
|
2019-07-01 10:02:36 -04:00
|
|
|
|
2019-10-01 10:58:44 -04:00
|
|
|
include::bucket/range-field-note.asciidoc[]
|