Class: ElasticsearchDslBuilder::DSL::Search::Aggregations::ReverseNested
- Inherits:
-
Aggregation
- Object
- Aggregation
- ElasticsearchDslBuilder::DSL::Search::Aggregations::ReverseNested
- Defined in:
- lib/elasticsearch_dsl_builder/dsl/search/aggregations/reverse_nested.rb
Instance Method Summary collapse
-
#initialize ⇒ ReverseNested
constructor
A new instance of ReverseNested.
- #path(path) ⇒ Object
- #to_hash ⇒ Object
Methods inherited from Aggregation
Constructor Details
#initialize ⇒ ReverseNested
Returns a new instance of ReverseNested.
6 7 8 9 |
# File 'lib/elasticsearch_dsl_builder/dsl/search/aggregations/reverse_nested.rb', line 6 def initialize @type = :reverse_nested super() end |
Instance Method Details
#path(path) ⇒ Object
11 12 13 14 15 |
# File 'lib/elasticsearch_dsl_builder/dsl/search/aggregations/reverse_nested.rb', line 11 def path(path) raise ArgumentError, 'path must be a String' unless path.instance_of?(String) @path = path self end |
#to_hash ⇒ Object
17 18 19 20 21 |
# File 'lib/elasticsearch_dsl_builder/dsl/search/aggregations/reverse_nested.rb', line 17 def to_hash @aggregation = {} @aggregation.update(path: @path) if @path super end |