Use BitSets to intersect the two queries. First knock up a HitCollector
that generates a bit set for the document set you want to search
(A,B,C,X,Y,Z). Then do another query generating a bit set for the
criteria on (C,X,Y). Then just interest the two bits sets using the
"and" method.

Mike

www.ardentia.com the home of NetSearch
-----Original Message-----
From: Jebus [mailto:[EMAIL PROTECTED] 
Sent: 30 January 2006 14:17
To: java-user@lucene.apache.org
Subject: searching specific documents

How do you search only certain documents. In the app I am writing
before I start searching with Lucene I know all the documents that I
want to search. For example I have documents A,B,C,X,Y,Z so before I
start the search I know that I only want to search docs C,X,Y due to
other non lucene criteria.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to