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 Trond Aksel Myklebust <tr...@stud.ntnu.no> on 2005/10/11 13:36:36 UTC

Intersecting queries

I need to be able to intersect the result of two queries based on a field
"ID". So if I do a search: 

Content2 = "something totally" and a search: Content1 = "something" I want
to return only Document 2 based on the field ID being the same.

Any tip on how to do this in Lucene, or should I go for an external
solution?

 

Document 1: 

ID = 500

Content1 = "something"

 

Document 2:

ID = 500

Content2 = "something totally"

 

Document 3:

ID = 501

Content2 = "something totally different"

 

 

Regards

Trond A Myklebust

 


Re: Intersecting queries

Posted by Paul Libbrecht <pa...@activemath.org>.
search a query using a filter that's a query-filter ??

paul


Le 11 oct. 05, à 13:36, Trond Aksel Myklebust a écrit :

> I need to be able to intersect the result of two queries based on a 
> field
> "ID". So if I do a search:
>
> Content2 = "something totally" and a search: Content1 = "something" I 
> want
> to return only Document 2 based on the field ID being the same.
>
> Any tip on how to do this in Lucene, or should I go for an external
> solution?
>
>
>
> Document 1:
>
> ID = 500
>
> Content1 = "something"
>
>
>
> Document 2:
>
> ID = 500
>
> Content2 = "something totally"
>
>
>
> Document 3:
>
> ID = 501
>
> Content2 = "something totally different"
>
>
>
>
>
> Regards
>
> Trond A Myklebust
>
>
>


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