Composite aggregation
/ Composite, / AggregationComposite aggregation #
Paginated multi-source bucket aggregation: the composite key is a tuple
built from several sources (a terms field, a histogram interval, a
date_histogram, a geotile_grid), and pages are pulled with an
after cursor. It does what a single
terms cannot: group
by several dimensions at once, and stream all combinations without
oversizing size.
How it works #
Each entry in sources is named: { "day": { … } } binds day to one
dimension of the composite key. A bucket’s key maps each source name
to its value; buckets come back in ascending key order — first source
most significant, values compared as numbers when both are (numbers
sort before strings), as strings otherwise.