Cumulative_sum

Cumulative sum aggregation

/ Cumulative_sum, / Aggregation

Cumulative sum aggregation #

A parent pipeline aggregation adding a running total column to each bucket — the metric plus every earlier bucket’s. A histogram says what each period brought in; the cumulative sum says where the whole span stands at every point along it, without a second query or client-side arithmetic.

"running": { "cumulative_sum": { "buckets_path": "revenue" } }

How it works #

cumulative_sum is declared inside the multi-bucket aggregation it decorates, next to the metric it consumes. After the buckets are built, the engine walks them in order and attaches the running total to each bucket under the pipeline’s own name:

...