Yes, easy, just make sure you close the time in your indices:
class Widget < ActiveRecord::Base define_index do indexes title has publish_at has unpublish_at ... end
To pull it out based solely on dates, a small amount of cheating is required due to the sphinx, requiring a limited range (x..y unlike x> = y). Using the minimum / maximum value is very inelegant, but at the moment I do not know about it well.
min_time = Time.now.advance(:years => -10) max_time = Time.now.advance(:years => 10) title = "foo" Widget.search title, :with => {:publish_at => min_time..Time.now, :unpublish_at => Time.now..max_time}
source share