Extended_stats

Extended stats aggregation

/ Extended_stats, / Aggregation

Extended stats aggregation #

A multi-value metrics aggregation extending stats with squares, variance, standard deviation and their lower/upper bounds. Where stats says what the values are, extended_stats says how tightly they cluster around the mean — the input for outlier bands, quality gates and anything else built on “how unusual is this value”.

How it works #

The engine walks the matching documents once, maintaining a running count, sum, sum_of_squares, minimum and maximum — the same single pass as stats, plus one multiply-add for the squares. Everything downstream is derived from these raw moments, and is exact (no sampling, no sketches):

...