Expand description
The aggregations in this family compute metrics based on values extracted in one way or another from the documents that are being aggregated. The values are typically extracted from the fields of the document (using the field data), but can also be generated using scripts.
Numeric metrics aggregations are a special type of metrics aggregation which output numeric values. Some aggregations output
a single numeric metric (e.g. avg) and are called single-value numeric metrics aggregation, others generate multiple
metrics (e.g. stats) and are called multi-value numeric metrics aggregation. The distinction between single-value and
multi-value numeric metrics aggregations plays a role when these aggregations serve as direct sub-aggregations of some
bucket aggregations (some bucket aggregations enable you to sort the returned buckets based on the numeric metrics in each bucket).
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics.html
Structsยง
- AvgAggregation
- A
single-valuemetrics aggregation that computes the average of numeric values that are extracted from the aggregated documents. These values can be extracted either from specific numeric fields in the documents. - Boxplot
Aggregation - A
boxplotmetrics aggregation that computes boxplot of numeric values extracted from the aggregated documents. These values can be generated from specific numeric or histogram fields in the documents. - Cardinality
Aggregation - A
single-valuemetrics aggregation that calculates an approximate count of distinct values. - MaxAggregation
- A
single-valuemetrics aggregation that keeps track and returns the maximum value among the numeric values extracted from the aggregated documents. - MinAggregation
- A
single-valuemetrics aggregation that keeps track and returns the minimum value among numeric values extracted from the aggregated documents. - Rate
Aggregation - A
ratemetrics aggregation can be used only inside adate_histogramand calculates a rate of documents or a field in eachdate_histogrambucket. The field values can be generated extracted from specific numeric or histogram fields in the documents. - SumAggregation
- A
single-valuemetrics aggregation that sums up numeric values that are extracted from the aggregated documents. These values can be extracted either from specific numeric or histogram fields. - TopHits
Aggregation - A
top_hitsmetric aggregation keeps track of the most relevant document being aggregated. This aggregation is intended to be used as a sub aggregation, so that the top matching documents can be aggregated per bucket.