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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to