Multi terms aggregation
/ Multi_terms, / AggregationMulti terms aggregation #
A multi-bucket aggregation like
terms, but the bucket
key is a TUPLE of values from several fields — e.g. every
(merchant, status) combination. It answers cross-tab questions —
“rows by column” tables — that a single-field terms aggregation
cannot express without chaining requests.
How it works #
Each entry in the terms array contributes one component of the
composite key. A document is placed in the bucket keyed by the tuple of
its values, and the response reports each bucket’s key as an array —
["infini-store", "pending"].