Method: Tire::Search::Query#prefix

Defined in:
lib/tire/search/query.rb

#prefix(field, value, options = {}) ⇒ Object



44
45
46
47
48
49
50
# File 'lib/tire/search/query.rb', line 44

def prefix(field, value, options={})
  if options[:boost]
    @value = { :prefix => { field => { :prefix => value, :boost => options[:boost] } } }
  else
    @value = { :prefix => { field => value } }
  end
end