Class: Arelastic::Queries::Query

Inherits:
Nodes::Node show all
Defined in:
lib/arelastic/queries/query.rb

Instance Method Summary collapse

Methods inherited from Nodes::Node

#==, #convert_to_elastic, #read_option!

Methods included from Arities::Binary

#binary

Methods included from Arities::Polyadic

#polyadic

Methods included from Arities::Unary

#unary

Instance Method Details

#has_child(path) ⇒ Object



8
9
10
# File 'lib/arelastic/queries/query.rb', line 8

def has_child path
  Arelastic::Queries::HasChild.new path, self
end

#has_parent(path) ⇒ Object



12
13
14
# File 'lib/arelastic/queries/query.rb', line 12

def has_parent path
  Arelastic::Queries::HasParent.new path, self
end

#negateObject



16
17
18
# File 'lib/arelastic/queries/query.rb', line 16

def negate
  Arelastic::Queries::Bool.new must_not: self
end

#nested(path) ⇒ Object



4
5
6
# File 'lib/arelastic/queries/query.rb', line 4

def nested path
  Arelastic::Queries::Nested.new path, self
end