You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Shalin Shekhar Mangar <sh...@gmail.com> on 2011/06/15 13:38:07 UTC
Merging with writer open on source index?
Hello,
IndexWriter.addIndexes(Directory...) method says that the index in each
directory must not be changed (opened by a writer) while this method is
running. However, IndexWriter.addIndexes(IndexReader...) does not say any
such thing. Would I be correct in assuming that since an IndexReader has a
static snapshot of the index, merging using addIndexes(IndexReader...) is
safe even if the source index has a writer open?
--
Regards,
Shalin Shekhar Mangar.
RE: Merging with writer open on source index?
Posted by Uwe Schindler <uw...@thetaphi.de>.
Yes.
-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de
> -----Original Message-----
> From: Shalin Shekhar Mangar [mailto:shalinmangar@gmail.com]
> Sent: Wednesday, June 15, 2011 1:38 PM
> To: java-user@lucene.apache.org
> Subject: Merging with writer open on source index?
>
> Hello,
>
> IndexWriter.addIndexes(Directory...) method says that the index in each
> directory must not be changed (opened by a writer) while this method is
> running. However, IndexWriter.addIndexes(IndexReader...) does not say
> any such thing. Would I be correct in assuming that since an IndexReader has
> a static snapshot of the index, merging using addIndexes(IndexReader...) is
> safe even if the source index has a writer open?
>
> --
> Regards,
> Shalin Shekhar Mangar.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org