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