Skip to content

Instantly share code, notes, and snippets.

@egze
Created March 31, 2012 12:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save egze/2263793 to your computer and use it in GitHub Desktop.
Save egze/2263793 to your computer and use it in GitHub Desktop.
Extending Tire for fuzzy search and other useful methods
module Tire
module Search
class Query
def fuzzy(match={})
@value = { :fuzzy => match }
@value
end
def text(match={})
@value = { :text => match }
@value
end
def wildcard(match={})
@value = { :wildcard => match }
@value
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment