mirror of https://github.com/apache/lucene.git
LUCENE-5672: Fix addIndexes to call maybeMerge
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1619642 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8154a8086a
commit
ef0f56211d
|
@ -96,7 +96,6 @@ Other
|
|||
perform as well as other options. (Robert Muir)
|
||||
|
||||
======================= Lucene 4.11.0 ======================
|
||||
(No Changes)
|
||||
|
||||
New Features
|
||||
|
||||
|
@ -106,6 +105,11 @@ New Features
|
|||
* LUCENE-5889: Add commit method to AnalyzingInfixSuggester, and allow just using .add
|
||||
to build up the suggester. (Varun Thacker via Mike McCandless)
|
||||
|
||||
Bug Fixes
|
||||
|
||||
* LUCENE-5672: IndexWriter.addIndexes() calls maybeMerge(), to ensure the index stays
|
||||
healthy. If you don't want merging use NoMergePolicy instead. (Robert Muir)
|
||||
|
||||
======================= Lucene 4.10.0 ======================
|
||||
|
||||
New Features
|
||||
|
|
|
@ -2388,11 +2388,6 @@ public class IndexWriter implements Closeable, TwoPhaseCommit, Accountable {
|
|||
* free space required will be higher by the size of the
|
||||
* starting index (see {@link #forceMerge(int)} for details).
|
||||
*
|
||||
* <p>
|
||||
* <b>NOTE:</b> this method only copies the segments of the incoming indexes
|
||||
* and does not merge them. Therefore deleted documents are not removed and
|
||||
* the new segments are not merged with the existing ones.
|
||||
*
|
||||
* <p>This requires this index not be among those to be added.
|
||||
*
|
||||
* <p>
|
||||
|
@ -2499,6 +2494,7 @@ public class IndexWriter implements Closeable, TwoPhaseCommit, Accountable {
|
|||
IOUtils.closeWhileHandlingException(locks);
|
||||
}
|
||||
}
|
||||
maybeMerge();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2654,6 +2650,7 @@ public class IndexWriter implements Closeable, TwoPhaseCommit, Accountable {
|
|||
} catch (OutOfMemoryError oom) {
|
||||
handleOOM(oom, "addIndexes(IndexReader...)");
|
||||
}
|
||||
maybeMerge();
|
||||
}
|
||||
|
||||
/** Copies the segment files as-is into the IndexWriter's directory. */
|
||||
|
|
Loading…
Reference in New Issue