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