Right - Sphinx has no concept of key/value pairs, so it doesn't know which client category values are relevant for a given search query, it just has all the values associated to the category document.
I think running the search from the ClientCategory model will be much better, as that gives you single values of group and position, you can pull in the category name easily enough, and you can add an attribute for the client_id and filter by that. If it's running particularly slow, do you have database indices set up on your foreign keys? And how slow is slow, and how many records? Cheers -- Pat On 19/06/2012, at 12:43 PM, mikej wrote: > Yes, but only once to each client and I am only interested in listing > categories for one client at once. So, for each client I would like a list > of categories ordered as above, leaving unassigned categories to the end > (although I can live without this if need be). > > -- > You received this message because you are subscribed to the Google Groups > "Thinking Sphinx" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/thinking-sphinx/-/syCtsNsVk6EJ. > 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. -- 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.
