Karthick, The solution that I use to this problem is to perform query1 and query2 and boost results matching query1. Then solr takes care of all the deduplication (not necessarily merging) automatically, would this work for your situation?
I stole this idea from this slide deck: "Make sure all relevant documents match... Make sure the best matching documents score highest..." -- http://www.lucidimagination.com/files/relevancy-ranking-meetup-presentation-14-dec-10.pptx (page 19) On Mon, Apr 2, 2012 at 7:28 AM, Karthick Duraisamy Soundararaj <karthick.soundara...@gmail.com> wrote: > Hi all, > I am finding a need to merge the results of multiple queries to > accomplish a functionality similar to this : > > 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. > > 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. > > Any suggestions/thoughts/pointers as where to begin looking for will be of > great help! > > Thanks, > Karthick