lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1044508 - in /lucene/dev/branches/branch_3x: ./ lucene/ lucene/src/java/org/apache/lucene/index/IndexWriter.java lucene/src/test/org/apache/lucene/index/TestNRTThreads.java solr/
Date Fri, 10 Dec 2010 20:59:50 GMT
Author: mikemccand
Date: Fri Dec 10 20:59:49 2010
New Revision: 1044508

URL: http://svn.apache.org/viewvc?rev=1044508&view=rev
Log:
LUCENE-2809: use del count from reader if it's pooled, in IW.numDocs

Modified:
    lucene/dev/branches/branch_3x/   (props changed)
    lucene/dev/branches/branch_3x/lucene/   (props changed)
    lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/IndexWriter.java
    lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/index/TestNRTThreads.java
    lucene/dev/branches/branch_3x/solr/   (props changed)

Modified: lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/IndexWriter.java?rev=1044508&r1=1044507&r2=1044508&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/IndexWriter.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/IndexWriter.java
Fri Dec 10 20:59:49 2010
@@ -1993,7 +1993,7 @@ public class IndexWriter implements Clos
 
     for (int i = 0; i < segmentInfos.size(); i++) {
       final SegmentInfo info = segmentInfos.info(i);
-      count += info.docCount - info.getDelCount();
+      count += info.docCount - numDeletedDocs(info);
     }
     return count;
   }

Modified: lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/index/TestNRTThreads.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/index/TestNRTThreads.java?rev=1044508&r1=1044507&r2=1044508&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/index/TestNRTThreads.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/index/TestNRTThreads.java
Fri Dec 10 20:59:49 2010
@@ -307,7 +307,7 @@ public class TestNRTThreads extends Luce
       System.out.println("TEST: done join [" + (System.currentTimeMillis()-t0) + " ms]; addCount="
+ addCount + " delCount=" + delCount);
     }
     writer.commit();
-    assertEquals(addCount.get() - delCount.get(), writer.numDocs());
+    assertEquals("index=" + writer.segString(), addCount.get() - delCount.get(), writer.numDocs());
       
     writer.close(false);
     dir.close();



Mime
View raw message