Class: OpenSearch::DSL::Search::Aggregations::MovingAvg

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

Overview

Given an ordered series of data, the Moving Average aggregation will slide a window across the data and emit the average value of that window.

Examples:

Passing the options as a Hash


aggregation :the_movavg do
  moving_avg buckets_path: 'the_sum'
end

Passing the options as a block


aggregation :the_movavg do
  moving_avg do
    buckets_path 'the_sum'
    model 'holt'
    window 5
    gap_policy 'insert_zero'
    settings({ alpha: 0.5 })
  end
end

Method Summary

Methods included from BaseAggregationComponent

included