Class: Daedal::Queries::BoolQuery
- Defined in:
- lib/daedal/queries/bool_query.rb
Instance Method Summary collapse
Methods inherited from Query
Instance Method Details
#to_hash ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/daedal/queries/bool_query.rb', line 20 def to_hash result = {bool: {should: should.map {|q| q.to_hash}, must: must.map {|q| q.to_hash}, must_not: must_not.map {|q| q.to_hash}}} = {minimum_should_match: minimum_should_match, boost: boost, _name: name, disable_coord: disable_coord} result[:bool].merge!(.select { |k,v| !v.nil? }) result end |