Bucket aggregations
Similar to metric aggregations, bucket
aggregations are also categorized into two forms: Single buckets that contain only a single bucket in the response, and multi buckets that contain more than one bucket in the response.
The following are the most important aggregations that are used to create buckets:
Multi bucket aggregations
Terms aggregation
Range aggregation
Date range aggregation
Histogram aggregation
Date histogram aggregation
Single bucket aggregation
Filter-based aggregation
Note
We will cover a few more aggregations such as
nested
andgeo
aggregations in subsequent chapters.
Buckets
aggregation response formats are different from the response formats of metric aggregations. The response of a bucket
aggregation usually comes in the following format:
"aggregations": { "aggregation_name": { "buckets": [ { "key": value, "doc_count": value }, ...... ] } }
Note
All the bucket...