Let's say you have two instances of your model, one with name
apple, second one with name
equal peach and third one with name 'apple peach'. If you want to get either one of them you should do something similar to the following:
Product.search do
minimum_match 1
keywords 'apple peach' # btw, fulltext is an alias to keywords
end
Now you will get all three results (at least you should get), crucial part is minimum_match
, without that Sunspot will use its defaults setting which is to return only 'full' matches (all phrases found).