Class: Arelastic::Aggregations::Nested

Inherits:
Bucket show all
Defined in:
lib/arelastic/aggregations/nested.rb

Instance Attribute Summary collapse

Attributes inherited from Bucket

#aggs

Attributes inherited from Aggregation

#meta, #name, #options

Instance Method Summary collapse

Methods inherited from Aggregation

#as_elastic, #nested, #reverse_nested

Methods inherited from Nodes::Node

#==, #convert_to_elastic, #read_option!

Methods included from Arelastic::Arities::Binary

#binary

Methods included from Arelastic::Arities::Polyadic

#polyadic

Methods included from Arelastic::Arities::Unary

#unary

Constructor Details

#initialize(name, path, aggs) ⇒ Nested

Returns a new instance of Nested.



6
7
8
9
# File 'lib/arelastic/aggregations/nested.rb', line 6

def initialize(name, path, aggs)
  super name, aggs: aggs
  @path = path
end

Instance Attribute Details

#pathObject

Returns the value of attribute path.



4
5
6
# File 'lib/arelastic/aggregations/nested.rb', line 4

def path
  @path
end

Instance Method Details

#as_elastic_aggregationObject



11
12
13
# File 'lib/arelastic/aggregations/nested.rb', line 11

def as_elastic_aggregation
  {"nested" => { "path" => path }}.merge(super)
end