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 Thu, 18 Sep 2008 16:08:08 GMT

IndexReader.isCurrent() goes and opens that most recent segments_N  
file from the index and then compares that version to its own.  So if  
your replication brought over a new segments_N then isCurrent would  
return false.

Mike

rahul_k123 wrote:

>
> I am doing replication and i am running scripts to sync the index b/ 
> w master
> and slave.
>
>
>
> Michael McCandless-2 wrote:
>>
>>
>> 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
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/IndexReader.isCurrent%28%29-tp19523435p19535854.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


---------------------------------------------------------------------
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