You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Rupinder Singh Mazara <rs...@ebi.ac.uk> on 2004/11/18 16:57:24 UTC

boolean/set operations on lucene queries

hi all

 I needed some help in solving the following problem
 a user executes query1 and query2

 both the queries( not result sets ) get stored, over time the user
 wants to find
 which documents from query1 are common to documents in query2 , basicall a
intersect of the results of query1 with query2


 and similarly the union and difference between the results of query1 and
query2

 without having to run the queries and storing the results into some kind of
datastructure
 does lucene provide some capabilities, i was reading about QueryFilter,
does anyone have
 experience with a simialar example


 thanks

 Rupinder


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: boolean/set operations on lucene queries

Posted by Paul Elschot <pa...@xs4all.nl>.
On Thursday 18 November 2004 16:57, Rupinder Singh Mazara wrote:
> hi all
> 
>  I needed some help in solving the following problem
>  a user executes query1 and query2
> 
>  both the queries( not result sets ) get stored, over time the user
>  wants to find
>  which documents from query1 are common to documents in query2 , basicall a
> intersect of the results of query1 with query2
> 
> 
>  and similarly the union and difference between the results of query1 and
> query2
> 
>  without having to run the queries and storing the results into some kind of
> datastructure
>  does lucene provide some capabilities, i was reading about QueryFilter,

The queries can be added as clauses to a BooleanQuery.
Such clauses can be optional, required or prohibited.

Regards,
Paul


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org