lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1619646 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/CHANGES.txt lucene/core/ lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
Date Fri, 22 Aug 2014 01:28:38 GMT
Author: rmuir
Date: Fri Aug 22 01:28:37 2014
New Revision: 1619646

URL: http://svn.apache.org/r1619646
Log:
LUCENE-5672: Fix addIndexes to call maybeMerge

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/branch_4x/lucene/core/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java

Modified: lucene/dev/branches/branch_4x/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/CHANGES.txt?rev=1619646&r1=1619645&r2=1619646&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/branch_4x/lucene/CHANGES.txt Fri Aug 22 01:28:37 2014
@@ -4,7 +4,6 @@ For more information on past and future 
 http://s.apache.org/luceneversions
 
 ======================= Lucene 4.11.0 ======================
-(No Changes)
 
 New Features
 
@@ -14,6 +13,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

Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java?rev=1619646&r1=1619645&r2=1619646&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
(original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
Fri Aug 22 01:28:37 2014
@@ -2540,11 +2540,6 @@ public class IndexWriter implements Clos
    * 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>
@@ -2658,6 +2653,7 @@ public class IndexWriter implements Clos
         IOUtils.closeWhileHandlingException(locks);
       }
     }
+    maybeMerge();
   }
   
   /**
@@ -2816,6 +2812,7 @@ public class IndexWriter implements Clos
     } catch (OutOfMemoryError oom) {
       handleOOM(oom, "addIndexes(IndexReader...)");
     }
+    maybeMerge();
   }
 
   /** Copies the segment files as-is into the IndexWriter's directory. */



Mime
View raw message