Class: Arelastic::Queries::Nested
- Inherits:
-
Query
- Object
- Nodes::Node
- Query
- Arelastic::Queries::Nested
- Defined in:
- lib/arelastic/queries/nested.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#path ⇒ Object
Returns the value of attribute path.
-
#query ⇒ Object
Returns the value of attribute query.
Instance Method Summary collapse
- #as_elastic ⇒ Object
-
#initialize(path, query, options = {}) ⇒ Nested
constructor
A new instance of Nested.
Methods inherited from Query
#has_child, #has_parent, #negate, #nested
Methods inherited from Nodes::Node
#==, #convert_to_elastic, #read_option!
Methods included from Arities::Binary
Methods included from Arities::Polyadic
Methods included from Arities::Unary
Constructor Details
#initialize(path, query, options = {}) ⇒ Nested
Returns a new instance of Nested.
6 7 8 9 10 |
# File 'lib/arelastic/queries/nested.rb', line 6 def initialize(path, query, = {}) @path = path @query = query @options = end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
4 5 6 |
# File 'lib/arelastic/queries/nested.rb', line 4 def @options end |
#path ⇒ Object
Returns the value of attribute path.
4 5 6 |
# File 'lib/arelastic/queries/nested.rb', line 4 def path @path end |
#query ⇒ Object
Returns the value of attribute query.
4 5 6 |
# File 'lib/arelastic/queries/nested.rb', line 4 def query @query end |
Instance Method Details
#as_elastic ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/arelastic/queries/nested.rb', line 12 def as_elastic params = { 'path' => path, 'query' => convert_to_elastic(query) }.update() { 'nested' => params } end |