Class: Elastic::Dsl::BoolQueryContext::BoolQueryWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/elastic/dsl/bool_query_context.rb

Instance Method Summary collapse

Constructor Details

#initialize(_query, _modifier) ⇒ BoolQueryWrapper

Returns a new instance of BoolQueryWrapper.



20
21
22
23
# File 'lib/elastic/dsl/bool_query_context.rb', line 20

def initialize(_query, _modifier)
  @query = _query
  @modifier = _modifier
end

Instance Method Details

#must(_node) ⇒ Object



25
26
27
28
# File 'lib/elastic/dsl/bool_query_context.rb', line 25

def must(_node)
  @query.must wrap(_node)
  self
end

#should(_node) ⇒ Object



30
31
32
33
# File 'lib/elastic/dsl/bool_query_context.rb', line 30

def should(_node)
  @query.should wrap(_node)
  self
end