You can use between
which accepts a range of numbers:
Sunspot.search(MyModel) do
with(:price).between(low_price..high_price)
end
If you only want to search for a minimum or maximum price, instead of between
you can use greater_than_or_equal_to
or less_than_or_equal_to
respectively, which both accept a number:
Sunspot.search(MyModel) do
with(:price).greater_than_or_equal_to(low_price)
end
See the Sunspot Wiki for more options.