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: IndexMergeTool - Close indexes before merge?
Date Wed, 10 Oct 2007 12:21:18 GMT

Yes, you should close the indices before adding them.  Both of the addIndexes*
methods that take Directory[] require that there are no writers changing the
index in those directories.

They do not acquire the write lock in those Directories, so it's up to your
application to ensure no writer changes the index while addIndexes is running. 

I'll update the javadocs with this caveat.  Thanks for pointing it out
Patrick!

Mike

"Patrick Kimber" <mailing.patrick.kimber@gmail.com> wrote:
> Hi
> 
> The IndexMergeTool (see url below) creates a new index, the
> "mergedIndex".
> 
> Do the other indexes, "index1", "index2", etc, need to be closed
> before performing the merge?
> This is the same as asking if the indexes passed to
> IndexWriter.addIndexes need to be closed before they are added to the
> new index.
> 
> http://svn.apache.org/repos/asf/lucene/java/trunk/contrib/miscellaneous/src/java/org/apache/lucene/misc/IndexMergeTool.java
> 
> Thanks for your help,
> 
> Patrick
> 
> ---------------------------------------------------------------------
> 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