lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <>
Subject Re: ReadOnly IndexReaders
Date Mon, 01 Jun 2009 21:58:10 GMT

On Jun 1, 2009, at 5:40 AM, Yonik Seeley wrote:

>> On May 30, 2009, at 13:27, Mark Miller <> wrote:
>>> Is there a valid use case? It seems like it might be a tricky  
>>> method,
>>> because its an IndexReader property and not the index.
>> But it's just a flag passed in
>> If you know it's read only and that there are no deletes, can't you  
>> avoid
>> isDeleted all together?
> If you know there are no deletes, you should be able to avoid calling
> isDeleted anyway.

But someone could call delete on the reader if it isn't read-only.   
The case I have is I'm writing a library that takes in an IndexReader  
and then I'm going to be iterating over the documents.  My thinking,  
and it may be faulty, is that if I know there are no deletes and the  
IR is read-only, I can eliminate the isDeleted() check.  Not likely a  
big deal until we're talking lots and lots of docs.


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

View raw message