I am looking to index a datetime column on a has_many relationship:

class Property < ActiveRecord::Base
  has_many :open_houses
end

The column I want to query on open_houses is :start
so In the property index I want to do something like:
    has open_houses(:start), :as => :open_house_date

But when I query on that relationship I don't want to query as a
datetime only the date portion.

So in SQL I used to do something like the following:

oh_dates = ["2010-02-12", "2010-02-13"]
Property.find(:all, :conditions => ["CAST(open_houses.start as date)
IN (?)", oh_dates])

How can I duplicate this w/ Thinking Sphinx?   Or does the conversion
from datetime to date no longer matter?

Thanks,
~ Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en.

Reply via email to