Thanks Pat. But let me first give you some simple use case. I guess I overcomplicated things, and there is maybe a solution in ThinkingSphinx as it is quite common. When having some live/instant search field one wants to have some distinct autosuggestions. Lets take the name field of an article model. When I insert "piz" in the search field I am interested in the first lets say 10 distinct article names as autosuggestion. When I simply fetch article objects using ThinkingSphinxs search method (and limiting the result to per_page 10), then I may come up with 10 same article names (as my model allows to have duplicate names ... and in my app thats quite often the case). I currently see 2 solutions for fetching articles with 10 distinct names. 1) Using facets, but I am not sure how performant that would be, as there can also be thousand of distinct article names (is there a way to limit the result, like only fetch factes with count > x?). 2) Grouping. Did not try that one yet, but maybe it could be a solution (but also needs another attribute field).
Do you maybe see another possibility? On Feb 9, 1:38 pm, Pat Allan <[email protected]> wrote: > Hi Kai > > I don't think there's any way to do this. At the very least, it's not part of > the Sphinx API, and so Riddle isn't going to be any help. Perhaps ask on the > Sphinx Forum and see if they've got anything useful to > suggest?http://sphinxsearch.com/forum/ > > Good luck! > > -- > Pat > > On 09/02/2011, at 6:32 PM, medihack wrote: > > > > > > > > > Hi. > > > Sometimes I am more interested in the indexed data itself than in the > > objects that contain them. > > > Lets assume the following search > > Post.search "foo" > > Now I would like to get all distinct strings that matches foo in the > > Post model and not the Post objects themself. Is there a way to access > > that found data directly (maybe through using Riddle). > > > I know that I could also extract that information from the returned > > objects, but as I am interested only in distinct strings and the Post > > model may have very often the same name attribute for example, I guess > > it is not that performant. > > > Best regards, > > Kai > > > -- > > 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 > > athttp://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.
