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