It's worth asking: why are you indexing the release date? Do you expect users to search for parts of that date? Or is it just so you can sort by it? If so, it's much better to have it stored as an attribute instead of a field:
has release_dates.release_date, :as => :release_date
Now, though, the issue is that you're dealing with a collection of dates, and so which date for any given game do you want to sort by - the latest one? The oldest one? Some kind of average?
Happy to discuss further, but it'll certainly help if you can tell us what you're trying to do with those release dates in regards to searching :)
Cheers
--
Pat
> --
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To post to this group, send email to thinkin...@googlegroups.com.
> To unsubscribe from this group, send email to thinking-sphi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
>
has "MIN(release_dates.release_date)", :as => :release_date, :type => :datetime
join release_dates # force the join if not used elsewhere
I'm not sure how MIN treats NULLs though, so you'll probably want to handle that.
--
Pat