lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Serebrennikov <dmit...@earthlink.net>
Subject Question about Filter
Date Fri, 12 Oct 2001 20:53:30 GMT
I though I understood the Filter idea, but it turns out that I had not. 
I checked the FAQ and found no useful information in there... Can anyone 
provide more information on how it is supposed to be used, please?

Here's what I thought:
    - that Filter contains a BitVector that could be used to 
"pre-select" documents by number, so that some documents could be 
quickly excluded without even evaluating the query on them.
    - that a Filter can be created once (expensive) and then be used 
with multiple queries (cheap)

The first point seems true, but the second I'm not sure about. The 
Filter's interface provides a BitVector given an IndexReader. This seems 
to mean that I have to re-create the BitVector every time... Maybe, I'm 
supposed to remember the bitVectors created inside the filter (keyed by 
IndexReader) and then check if IndexReader has been updated since I last 
saw it? Is this the idea? In that case we probably need a lastModified() 
method on the IndexReader. The ones that are there are static and 
require a Directory or a file.


Mime
View raw message