Class: Daedal::Queries::MatchQuery
- Defined in:
- lib/daedal/queries/match_query.rb
Instance Method Summary collapse
Methods inherited from Query
Instance Method Details
#to_hash ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/daedal/queries/match_query.rb', line 23 def to_hash result = {match: {field => {query: query}}} = {minimum_should_match: minimum_should_match, cutoff_frequency: cutoff_frequency, type: type, analyzer: analyzer, boost: boost, fuzziness: fuzziness, operator: operator, slop: slop, max_expansions: max_expansions, prefix_length: prefix_length, lenient: lenient} result[:match][field].merge! .select {|k,v| !v.nil?} result end |