Class: Elasticsearch::DSL::Search::Aggregations::Terms

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

Overview

A multi-bucket aggregation which returns the collection of terms and their document counts

Examples:

Passing the options as a Hash


aggregation :tags do
  terms field: 'tags'
end

Passing the options as a block


search do
  aggregation :tags do
    terms do
      field 'tags'
    end
  end
end

See Also:

Method Summary

Methods included from BaseAggregationComponent

included