Class: Elasticsearch::DSL::Search::Aggregations::StatsBucket

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

Overview

A sibling pipeline aggregation which calculates a variety of stats across all bucket of a specified metric in a sibling aggregation.

Examples:

Passing the options as a Hash


aggregation :stats_monthly_sales do
  stats_bucket buckets_path: 'sales_per_month>sales'
end

Passing the options as a block


aggregation :stats_monthly_sales do
  stats_bucket do
    buckets_path 'sales_per_month>sales'
  end
end

See Also:

Method Summary

Methods included from BaseAggregationComponent

included