lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: IndexReader.isCurrent()
Date Wed, 17 Sep 2008 09:40:11 GMT

rahul_k123 wrote:

> what is the behaviour of IndexReader.current() if i modify the index
> manually? Will it returns false?

What do you mean by "manually"?

Once an IndexWriter commits a change to the index after the  
IndexReader was opened, then IndexReader.isCurrent() will return false.

> One more question
>
> The index is on Linux
>
> if my indexReader is open and some of the files in index are  
> deleted, what
> is the behaviour of this?
>
> Will it give any exception like File Not found??

Assuming it's a local filesystem on Linux (eg, not NFS) then if  
IndexReader has the file open and you delete it from the filesystem,  
that IndexReader is unaffected.

But, you should not delete files yourself -- IndexWriter does that for  
you at the right times.

Mike

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


Mime
View raw message