lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r643305 - in /lucene/java/branches/lucene_2_3/src: java/org/apache/lucene/index/LogMergePolicy.java test/org/apache/lucene/index/TestAddIndexesNoOptimize.java
Date Tue, 01 Apr 2008 07:01:44 GMT
Author: mikemccand
Date: Tue Apr  1 00:01:41 2008
New Revision: 643305

URL: http://svn.apache.org/viewvc?rev=643305&view=rev
Log:
LUCENE-1254: don't reject segments > maxMergeDocs/Size in IW.addIndexesNoOptimize

Modified:
    lucene/java/branches/lucene_2_3/src/java/org/apache/lucene/index/LogMergePolicy.java
    lucene/java/branches/lucene_2_3/src/test/org/apache/lucene/index/TestAddIndexesNoOptimize.java

Modified: lucene/java/branches/lucene_2_3/src/java/org/apache/lucene/index/LogMergePolicy.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/src/java/org/apache/lucene/index/LogMergePolicy.java?rev=643305&r1=643304&r2=643305&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_3/src/java/org/apache/lucene/index/LogMergePolicy.java (original)
+++ lucene/java/branches/lucene_2_3/src/java/org/apache/lucene/index/LogMergePolicy.java Tue
Apr  1 00:01:41 2008
@@ -269,13 +269,6 @@
       final SegmentInfo info = infos.info(i);
       long size = size(info);
 
-      // Refuse to import a segment that's too large
-      if (info.docCount > maxMergeDocs && info.dir != directory)
-        throw new IllegalArgumentException("Segment is too large (" + info.docCount + " docs
vs max docs " + maxMergeDocs + ")");
-
-      if (size >= maxMergeSize && info.dir != directory)
-        throw new IllegalArgumentException("Segment is too large (" + size + " vs max size
" + maxMergeSize + ")");
-
       // Floor tiny segments
       if (size < 1)
         size = 1;

Modified: lucene/java/branches/lucene_2_3/src/test/org/apache/lucene/index/TestAddIndexesNoOptimize.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/src/test/org/apache/lucene/index/TestAddIndexesNoOptimize.java?rev=643305&r1=643304&r2=643305&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_3/src/test/org/apache/lucene/index/TestAddIndexesNoOptimize.java
(original)
+++ lucene/java/branches/lucene_2_3/src/test/org/apache/lucene/index/TestAddIndexesNoOptimize.java
Tue Apr  1 00:01:41 2008
@@ -150,20 +150,6 @@
     writer.close();
 
     writer = newWriter(dir, false);
-    int maxMergeDocs = writer.getMaxMergeDocs();
-    writer.setMaxMergeDocs(99);
-
-    try {
-      // upper bound cannot exceed maxMergeDocs
-      writer.addIndexesNoOptimize(new Directory[] { aux });
-      assertTrue(false);
-    }
-    catch (IllegalArgumentException e) {
-      assertEquals(100, writer.docCount());
-      assertEquals(1, writer.getSegmentCount());
-    }
-
-    writer.setMaxMergeDocs(maxMergeDocs);
     try {
       // cannot add self
       writer.addIndexesNoOptimize(new Directory[] { aux, dir });



Mime
View raw message