Class: Arelastic::Aggregations::Terms
- Inherits:
-
Bucket
- Object
- Nodes::Node
- Aggregation
- Bucket
- Arelastic::Aggregations::Terms
- Defined in:
- lib/arelastic/searches/terms.rb,
lib/arelastic/aggregations/terms.rb
Instance Attribute Summary collapse
-
#field ⇒ Object
Returns the value of attribute field.
-
#options ⇒ Object
Returns the value of attribute options.
Attributes inherited from Bucket
Attributes inherited from Aggregation
Instance Method Summary collapse
- #as_elastic ⇒ Object
- #as_elastic_aggregation ⇒ Object
-
#initialize(field, options = {}) ⇒ Terms
constructor
A new instance of Terms.
Methods inherited from Aggregation
Methods inherited from Nodes::Node
#==, #convert_to_elastic, #hash, #read_option!
Methods included from Arelastic::Arities::Binary
Methods included from Arelastic::Arities::Polyadic
Methods included from Arelastic::Arities::Unary
Constructor Details
#initialize(field, options = {}) ⇒ Terms
Returns a new instance of Terms.
6 7 8 9 |
# File 'lib/arelastic/searches/terms.rb', line 6 def initialize field, = {} @field = field @options = end |
Instance Attribute Details
#field ⇒ Object
Returns the value of attribute field.
4 5 6 |
# File 'lib/arelastic/searches/terms.rb', line 4 def field @field end |
#options ⇒ Object
Returns the value of attribute options.
4 5 6 |
# File 'lib/arelastic/searches/terms.rb', line 4 def @options end |
Instance Method Details
#as_elastic ⇒ Object
11 12 13 14 15 |
# File 'lib/arelastic/searches/terms.rb', line 11 def as_elastic params = {"field" => field}.update() {"terms" => params} end |
#as_elastic_aggregation ⇒ Object
4 5 6 |
# File 'lib/arelastic/aggregations/terms.rb', line 4 def as_elastic_aggregation {'terms' => }.merge(super) end |