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