Class: Arelastic::Aggregations::Filters
- Inherits:
-
Bucket
- Object
- Nodes::Node
- Aggregation
- Bucket
- Arelastic::Aggregations::Filters
- Defined in:
- lib/arelastic/aggregations/filters.rb
Instance Attribute Summary collapse
-
#filters ⇒ Object
Returns the value of attribute filters.
Attributes inherited from Bucket
Attributes inherited from Aggregation
Instance Method Summary collapse
- #as_elastic_aggregation ⇒ Object
-
#initialize(name, filters, options = {}) ⇒ Filters
constructor
A new instance of Filters.
Methods inherited from Aggregation
#as_elastic, #nested, #reverse_nested
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(name, filters, options = {}) ⇒ Filters
Returns a new instance of Filters.
6 7 8 9 |
# File 'lib/arelastic/aggregations/filters.rb', line 6 def initialize(name, filters, = {}) super name, @filters = filters end |
Instance Attribute Details
#filters ⇒ Object
Returns the value of attribute filters.
4 5 6 |
# File 'lib/arelastic/aggregations/filters.rb', line 4 def filters @filters end |
Instance Method Details
#as_elastic_aggregation ⇒ Object
11 12 13 |
# File 'lib/arelastic/aggregations/filters.rb', line 11 def as_elastic_aggregation {'filters' => {'filters' => convert_to_elastic(filters)}}.merge(super) end |