I'm building an app that has posts with expiration dates, and using Thinking Sphinx as the search tool.
Basically, what I'm looking for is a way when doing the search, to filter out all the posts that are expired
So basically apply this
@posts = Post.where('expiration > ?', DateTime.now)
to this
@posts = Post.search(params[:search])
Here's my index file
ThinkingSphinx::Index.define :post, :with => :active_record do
indexes :title
indexes :duties
indexes :experience
has employer_id, expiration, created_at
end