Bucket aggregations #
Group documents into buckets: by field value, by numeric or date range, by query, by sampling, into geo cells, or relationally.
By field value #
- Terms — bucket per exact term, ordered by count
- Rare terms — the terms that occur rarely
- Significant terms — terms unusually common in the foreground
- Multi terms — bucket per composite of several fields
- Composite — cursor-paged combination of sources
By range #
- Histogram — fixed-interval numeric buckets
- Variable width histogram — data-driven bucket edges
- Date histogram — calendar / fixed time buckets
- Auto date histogram — target bucket count, interval picked for you
- Range — hand-written ranges
- Date range — hand-written date ranges
- IP range — CIDR / mask ranges over IP fields
By query and by relation #
- Filter — one query, one bucket, in filter context
- Filters — named bucket per query
- Nested — aggregate per nested element
- Children — walk a relation into child documents
- Global — all documents, ignoring the query
- Missing — documents lacking a field
- Adjacency matrix — pairwise intersections of named filters
Sampling and geo #
- Sampler — keep the top N documents
- Diversified sampler — sample, diversified by a value
- Geohash grid, Geotile grid — geo cell buckets
- Geo distance — distance rings around a point