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