On 29/08/2009, at 12:02 PM, Joost wrote:

> Forked code has some nicer logging (at least I think).. that shows
> like this (with nice colors):
>
>> Sphinx   Querying: '@name john'
>> Sphinx (0.066103s)   Found 141 results
>> User Load (0.7ms)   SELECT * FROM `users` WHERE (`users`.`id` IN  
>> (38513,42492,1413,2874,3766,4484,7198,9188,10538,13048,14489,15779,16247,16488,19189,20108,20632,21923,22547,22816
>>  
>> ))
>
> You could pull it?

Consider it likely, especially since it mirrors AR (and it's useful  
information).

> I will look at the current facets implementation and how Riddle
> supports multiple queries. Would be nice to have the new Riddle in TS.

There's two versions of Riddle (master and 0.9.9 branches), paired to  
the matching versions of TS (master and sphinx-0.9.9) - so the latter  
version of TS does have those Riddle changes already.

> My idea on Facets (from the top of my mind) is just to add some
> queries to a search so the facets are returned. Eg. the added search
> fields would be:
> { :group_by => 'some_facet_attribute', :group_format
> => :attr, :group_clause => '@count desc' }
> and maybe some per_page / limit changes..
>
> We could then only use the result coming from Sphinx without doing any
> Ruby stuff.

I'm not quite sure what you want to change... do you want to add facet  
calls to normal searches? Or search calls to facet searches? Or  
something else?

Also, the reason AR objects are instantiated for facets calls is  
because we need the objects to determine values for string facets.

> What is actually done on the Ruby side when I do a Model.facets (after
> the Sphinx + SQL query..)?

This is actually going to be tricky, the more I think about it,  
because FacetSearch conducts each search query separately. Riddle, on  
the other hand, needs each search queued, then will run them all and  
return an array of result hashes.

Will be interested to see how you tackle the problem :)

-- 
Pat

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to