class Daedal::Queries::MatchQuery
Public Instance Methods
to_hash()
click to toggle source
# File lib/daedal/queries/match_query.rb, line 23 def to_hash result = {match: {field => {query: query}}} options = {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! options.select {|k,v| !v.nil?} result end