class Daedal::Queries::BoolQuery
Public Instance Methods
to_hash()
click to toggle source
# 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}}} options = {minimum_should_match: minimum_should_match, boost: boost, _name: name, disable_coord: disable_coord} result[:bool].merge!(options.select { |k,v| !v.nil? }) result end