Ah, well that's instructive.  I'm surprised that the feature is 0.9.9-
specific, given that the Mysql performance book is at least a year or
two old, and 0.9.9 _still_ hasn't been released (which is sort of
silly IMO, but that's a different post).

Sounds like it would take some non-trivial architectural changes to
get this working, I'll have to keep it in my back pocket as a rainy
day possibility if I can't find other ways to optimize.  Google is a
pretty barren wasteland currently when it comes to any data/
information about parallel result sets, so it's hard to forecast
whether the performance gain would be more like 1%, 10%, or 100%...

At any rate, I have to imagine that probably a moderately high
percentage of all Sphinx searches do both a facet grouping along with
each search, so if you could get this pulled off (and Sphinx
cooperated to yield a performance benefit), it would surely be a much
appreciated effort by many.

Thanks,
Bill

On Sep 2, 9:12 am, Pat Allan <[email protected]> wrote:
> Hi Bill
>
> Multiple queries is a feature of Sphinx 0.9.9 - so the master branch  
> of Riddle does not support it. The 0.9.9 branch (and thus, the  
> sphinx-0.9.9 branch of Thinking Sphinx) does, but there's nothing in  
> TS to take advantage of it. I'm not sure how this can be done at this  
> point in time - each search is a distinct object, talking to a  
> distinct Riddle client instance. I appreciate the syntax suggestions,  
> and hopefully I can dedicate some time to working through the  
> technical issues.
>
> So, the short answer: it's possible, but not yet implemented.
>
> Cheers
>
> --
> Pat
>
> On 01/09/2009, at 10:27 AM, wbharding wrote:
>
>
>
> > I was just reading through the Sphinx section in my trust "High
> > Performance MySQL" book, and noticed that they talk about the idea of
> > optimizing query time by using parallel result sets.  Here's the
> > example they give:
>
> > $cl = new SphinxClient();
> > $cl->SetSortMode( SPH_SORT_EXTENDED, "price desc" );
> > $cl->AddQuery( "ipod" );
> > $cl->SetGroupBy( "category_id", SPH_GROUPBY_ATTR, "@count desc" );
> > $cl->AddQuery( "ipod" );
> > $cl->RunQueries();
>
> > We are doing something almost identical to this example in our code,
> > wherein every item search on our site actually runs three different
> > queries:  one "real" query, one query to get category counts, and one
> > query to find items that belong to "special sellers" of ours (which
> > amounts to the "real" query plus one extra filter).  According to the
> > book, Sphinx can often be pretty smart about consolidating the work
> > for multiple queries if it knows all the queries that you want to
> > run.  (Which sort of boggles my mind, but then, so do many things when
> > it comes to full text indexing)
>
> > Anyway, my question:  could anything like the functionality above be
> > possibly achieved with TS?  I'm thinking the syntax might be something
> > like:
>
> > Item.search("ipod", :delayed => true )
> > Item.search("ipod", :group => "category_id", :delayed => true)
> > Item.run_search # returns array of all search results
>
> > But I'm not sure if there are architectural reasons why something like
> > this would be impossible (or very difficult) to achieve if I were to
> > try to patch TS.  Bonus points if anyone has actually attempted this,
> > and/or could speak to the possible performance gains in successfully
> > implementing this.
>
> > Thanks,
> > Bill
--~--~---------~--~----~------------~-------~--~----~
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