Hi Pete
Try :order => :name_sort. I'm pretty sure the problem is that because
you're not searching on a single model, TS doesn't have a reference
point for fields flagged as sortable, and so it doesn't make any
translations.
--
Pat
On 29/08/2009, at 5:34 PM, Pete Deffendol wrote:
>
> Hi,
>
> I can't seem to perform a search over more than one model, and specify
> a sort order on a field common to each model. Is there a way to do
> this? Here's something like what I have:
>
> class State < ActiveRecord::Base
> define_index do
> indexes :name, :sortable => true
> end
> end
>
> class Place < ActiveRecord::Base
> define_index do
> indexes :name, :sortable => true
> end
> end
>
>
>>> ThinkingSphinx.search('foo', :classes => [State, Place], :order
> => :name)
> => []
>
> I get results if I search each model separately.
>
> Thanks!
>
> Pete
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---