Hey guys,
i have a model "track" with the following index structure:
define_index do
indexes tags, :sortable => true
indexes short_description, :sortable => true
indexes full_description, :sortable => true
indexes artist, :sortable => true
indexes title, :sortable => true
end
This works fine so far....
Now, my model "track" has a belongs_to-association to the model
"category", which in turn has a "has_many"-association to the model
"category_translations" (globalize2)
So i thought i could do the following query and get back the results
sorted via category-name:
Track.search 'beat', :order => 'category_translations.name
ASC', :joins => {:category => :category_translations}
but this gives me an empty resultset.
In my log-files i can see the error:
Sphinx: beat
Sphinx Result: []
Sphinx Error: index track_core: sort-by attribute
'category_translations' not found
What do i have to do in order to be able to sort after the category-
name?
Do i have to index it separately?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---