lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karthick Duraisamy Soundararaj <>
Subject Implementing SOLR - 1093
Date Fri, 06 Apr 2012 15:32:04 GMT
Hi all,
        I am finding a need to merge the results of multiple queries to
accomplish a functionality similar to this The rules are:

                     1. Make query 1
                     2. If results returned by query1 is less than a
certain threshold, then Make query 2

Extending this idea, I want to be able to create a query chain, i.e,
provide a functionality where you could specify n queries and n-1
thresholds in a single url. Start querying in the order from 1 to n until
one of them produces results that exceed the threshold.

I have got a proof of concept ready where I just modified doFilter function
in I am thinking about writing a
MultiSelectHandler that would handle the multiselect functionality. There
are three designs that come to my mind.

                     1. I could add a wrapper in the doFilter that would
create muliple SearchHandler's and run them in parallel and merge them into
                     2. I could have a MultiSearch handler that derives
from the RequestHandlerBase. MultiSearchHandler would compose the List of
SearchHandler objects and execute them.
                     3. MultiSearchHandler could compose multiple
SearchComponents and execute them.

PS: These n queries and n threshold are passed on a single url and each of
them could use different request handlers and therefore take a different
set of parameters. By threshold I mean the count of results
returned(hits/NumFound). Also, this new functionality is just a start to
many. It would help us execute queries in parallel and come up with various
flavours like just send two queries and merge the results of two etc.

Thank you,

View raw message