Avg bucket aggregation #
A sibling pipeline aggregation computing the average of a metric across another aggregation’s buckets.
"avg_day": { "avg_bucket": { "buckets_path": "per_day>revenue" } }
Example #
Average daily revenue across the date-histogram buckets:
Parameters for avg_bucket
#
buckets_path
(Required, string) Path to the consumed metric:"<bucket_agg>><metric>".format
(Optional, string) Output number format.gap_policy
(Optional, string) What to do with missing buckets:skip(default) orinsert_zeros.