You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Seffie Schwartz <ys...@yahoo.com> on 2010/03/05 13:39:33 UTC

intersection of the results of multiple queries

hi -

Is there any way to get the intersection of the results of multiple queries without iterating through each result set?

seff



Re: intersection of the results of multiple queries

Posted by Seffie Schwartz <ys...@yahoo.com>.
this might better explain what I am looking for - i also posted it on yonik seely's blog


 So if my indices had these docs:
doc1 – fielda:foo
doc2 – fielda:yyy
doc3 – fieldb:bar
doc4 – fieldb:xxx
doc5 – fielda:bar
I want to return doc1 and doc5 because fielda has both values that I am looking for – foo and bar.
I do not want to multivalue my fields.

Somebody else asked the same question:

What I would really like to see is the ability to take the results
of the first query and use one or more of its fields as an argument in
the second query. For example:
type:foo AND (_query_:type:bar AND id:{field1})
This should search for all types of foo and then iterate over the
result set and perform a query for where type is bar and id is equal to
the value of field1 from each item of the first result set.
I can do this in a linear fashion on the client side, but I am
hoping to be able to make it more efficient by it being implemented on
the server side.
Is there any hope for this?



----- Original Message ----
From: Koji Sekiguchi <ko...@r.email.ne.jp>
To: solr-dev@lucene.apache.org
Sent: Fri, March 5, 2010 8:11:51 AM
Subject: Re: intersection of the results of multiple queries

Seffie Schwartz wrote:
> hi -
>
> Is there any way to get the intersection of the results of multiple queries without iterating through each result set?
>
> seff
>  
How about using multiple fq parameters?

Koji

-- 
http://www.rondhuit.com/en/


Re: intersection of the results of multiple queries

Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
Seffie Schwartz wrote:
> hi -
>
> Is there any way to get the intersection of the results of multiple queries without iterating through each result set?
>
> seff
>   
How about using multiple fq parameters?

Koji

-- 
http://www.rondhuit.com/en/