The metrics aggregation family computes metrics based on values collected from the aggregated documents. Numeric metrics aggregations are a special kind of metrics aggregations that output numeric values. single-value numeric aggregations are aggregations that output a single numeric metric, and multi-value numeric metrics aggregations return multiple metrics. This is an important distinction when the aggregations are used as a sub-aggregation within a bucket aggregation. The following are some of the main metrics aggregation types:
- Avg aggregation
- Weighted avg aggregation
- Cardinality aggregation
- Extended stats aggregation
- Max aggregation
- Min aggregation
- Scripted metric aggregation
- Stats aggregation
- Sum aggregation
Now, let's cover these aggregation types in detail.