Class: OpenSearch::DSL::Search::Aggregations::AvgBucket

Inherits:
Object
  • Object
show all
Includes:
BaseAggregationComponent
Defined in:
lib/opensearch/dsl/search/aggregations/pipeline/avg_bucket.rb

Overview

A sibling pipeline aggregation which calculates the (mean) average value of a specified metric in a sibling aggregation.

Examples:

Passing the options as a Hash


aggregation :avg_monthly_sales do
  avg_bucket buckets_path: 'sales_per_month>sales'
end

Passing the options as a block


aggregation :avg_monthly_sales do
  avg_bucket do
    buckets_path 'sales_per_month>sales'
  end
end

Method Summary

Methods included from BaseAggregationComponent

included