Sum

Sum aggregation

/ Sum, / Aggregation

Sum aggregation #

A single-value metrics aggregation that sums up numeric values that are extracted from the aggregated documents. It turns “how much in total” into one number — revenue, bytes, durations, counts of units — without shipping the matching documents anywhere.

How it works #

The engine walks the matching documents once, adding each value to a running total. Values are coerced to doubles as they are read — integers, floats and booleans (true = 1, false = 0) contribute, non-numeric values such as keyword strings do not.

...