Class: OpenSearch::DSL::Search::Aggregations::Stats

Inherits:
Object
  • Object
show all
Includes:
BaseComponent
Defined in:
lib/opensearch/dsl/search/aggregations/stats.rb

Overview

A multi-value metrics aggregation which returns statistical information on numeric values

Examples:

Passing the options as a Hash


search do
  aggregation :clicks_stats do
    stats field: 'clicks'
  end
end

Passing the options as a block


search do
  aggregation :clicks_stats do
    stats do
      field 'clicks'
    end
  end
end

Method Summary

Methods included from BaseComponent

included, #initialize