Class: OpenSearch::DSL::Search::Aggregations::Filters

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

Overview

A multi-bucket aggregation which defines multiple buckets matching the provided filters, usually to define scope for a nested aggregation

Examples:


search do
  aggregation :avg_clicks_per_tag_one_and_two do
    filters do
      filters one: { terms: { tags: ['one'] } },
              two: { terms: { tags: ['two'] } }

      aggregation :avg do
        avg field: 'clicks'
      end
    end
  end
end

See Also:

Method Summary

Methods included from BaseAggregationComponent

included