This is used to compute metrics based on values extracted from the fields of a document. Metrics are used in conjunction with buckets. The different metrics that are available are as follows:
- Count: The default metric in Kibana visualizations; returns the count of documents
- Average: Used to compute the average value (for a field) of all the documents in the bucket
- Sum: Used to compute the sum value (for a field) of all the documents in the bucket
- Median: Used to compute the median value (for a field) of all the documents in the bucket
- Min: Used to compute the minimum value (for a field) of all the documents in the bucket
- Max: Used to compute the maximum value (for a field) of all the documents in the bucket
- Standard deviation: Used to compute the standard deviation (for a field) of all the documents in the bucket
- Percentiles: Used to compute the number of percentile values
- Percentile ranks: For a set of percentiles, this is used to compute the corresponding values