Hello Shaun Sorry, I'm pretty flat out at the moment (and about to go overseas for a few weeks), so support is a little haphazard currently.
I think what you want to do is grouping - sphinx_select is really only for adding extra attributes to what gets returned in the raw Sphinx results. Grouping, on the other hand, returns one match for each group - and you can group by any of your attributes. http://freelancing-god.github.com/ts/en/searching.html#grouping Hope this helps -- Pat On 13/01/2010, at 1:10 PM, Shaun wrote: > Hello again > > Has anyone got some pointers for me or am I asking a daft question? > > Thanks again > > Shaun > > On Jan 12, 12:07 pm, Shaun <[email protected]> wrote: >> Hello >> >> Is there a way to display only distinct records? For some reason or >> another I have duplicates in my database but the duplicates have >> individual ID's. I was using :select DISTINCT field1, field2 etc with >> AR, but how do I do the same with TS? >> >> I have tried using sphinx_select as you have documented on your >> blog:http://freelancing-gods.com/posts/a_month_in_the_life_of_thinking_sphinx >> >> but I get this error: >> >> searchd error (status: 1): select: syntax error, unexpected SEL_TOKEN, >> expecting $end or ',' near 'tl, st, cns1') >> >> which is pointing to my search query. >> >> Is it at all possible to use something like Active Record's :select to >> avoid displaying duplicates? Maybe i've missed something in the >> syntax? >> >> Many thanks for your time. >> >> Shaun > -- > 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. > >
-- 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.
