Extended_stats_bucket

Extended stats bucket aggregation

/ Extended_stats_bucket, / Aggregation

Extended stats bucket aggregation #

A sibling pipeline aggregation extending stats_bucket with variance, standard deviation and their sampling variants of the per-bucket metric distribution. Use it when the spread of the per-bucket numbers matters — how uneven the days or categories are — not just their min/avg/max envelope.

"day_xstats": {
  "extended_stats_bucket": { "buckets_path": "per_day>revenue" }
}

How it works #

extended_stats_bucket is declared next to the bucket aggregation it consumes and runs after every regular aggregation — including the distributed merge — has finished. It walks the parent’s finished buckets, collects one number per bucket, and emits an extended_stats-shaped result over that sample:

...