Class: Daedal::Queries::DisMaxQuery
- Defined in:
- lib/daedal/queries/dis_max_query.rb
Instance Method Summary collapse
Methods inherited from BaseQuery
Instance Method Details
#to_hash ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/daedal/queries/dis_max_query.rb', line 17 def to_hash result = {dis_max: {queries: queries.map {|q| q.to_hash }}} = {tie_breaker: tie_breaker, boost: boost} result[:dis_max].merge!(.select { |k,v| !v.nil? }) result end |