lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Bowesman <>
Subject Re: How can I search over all documents NOT in a certain subset?
Date Thu, 07 Jun 2007 05:36:08 GMT
Steven Rowe wrote:
> Conceptually (caveat: untested), you could:
> 1. Extend Filter[1] (call it DejaVuFilter) to hold a BitSet per
> IndexReader.  The BitSet would hold one bit per doc[2], each initialized
> to true.
> 2. Unset a DejaVuFilter instance's bit for each of your top N docs by
> walking the TopDocs returned by,Filter,int)[3].
> Initially, you could pass in null for the Filter, and then for all
> following calls, an instance of DejaVuFilter.

Just a thought...

If Hilton wants to be aware of new Documents in the index since the previous 
search, this requires opening a new IndexReader.

If only Documents have been added to the index I expect, but am not sure, that 
the bits from the old IndexReader are still valid for the document numbers in 
the new Reader.  However, if there have been deletions or optimisation has 
occurred between reader instances, then the document ids from the old reader may 
not represent the same documents in the new reader, so the Filter for the old 
reader will not be valid for the new search against the new reader and you may 
get false matches.

I don't think there will be a problem if there are no deletions.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message