You're viewing version 2.13 of the OpenSearch documentation. This version is no longer maintained. For the latest version, see the current documentation. For information about OpenSearch version maintenance, see Release Schedule and Maintenance Policy.
Metric aggregations
Metric aggregations let you perform simple calculations such as finding the minimum, maximum, and average values of a field.
Types of metric aggregations
There are two types of metric aggregations: single-value metric aggregations and multi-value metric aggregations.
Single-value metric aggregations
Single-value metric aggregations return a single metric, for example, sum
, min
, max
, avg
, cardinality
, or value_count
.
Multi-value metric aggregations
Multi-value metric aggregations return more than one metric. These include stats
, extended_stats
, matrix_stats
, percentile
, percentile_ranks
, geo_bound
, top_hits
, and scripted_metric
.
Supported metric aggregations
OpenSearch supports the following metric aggregations:
- Average
- Cardinality
- Extended stats
- Geobounds
- Matrix stats
- Maximum
- Minimum
- Percentile ranks
- Percentile
- Scripted metric
- Stats
- Sum
- Top hits
- Value count