lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o...@apache.org
Subject svn commit: r431303 - in /lucene/java/trunk: CHANGES.txt src/java/org/apache/lucene/index/IndexWriter.java
Date Mon, 14 Aug 2006 06:58:42 GMT
Author: otis
Date: Sun Aug 13 23:58:42 2006
New Revision: 431303

URL: http://svn.apache.org/viewvc?rev=431303&view=rev
Log:
- Undid LUCENE-388, as it turned out it caused problems

Modified:
    lucene/java/trunk/CHANGES.txt
    lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java

Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/CHANGES.txt?rev=431303&r1=431302&r2=431303&view=diff
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Sun Aug 13 23:58:42 2006
@@ -121,9 +121,6 @@
      during segment merges (e.g. during indexing or optimizing), thus improving
      performance . (Michael Busch via Otis Gospodnetic)
 
-  4. LUCENE-388: Changes to maybeMergeSegments() to improve indexing speed.
-     (Paul Smith via Otis Gospodnetic)
-
 Release 2.0.0 2006-05-26
 
 API Changes

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java?rev=431303&r1=431302&r2=431303&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java Sun Aug 13 23:58:42
2006
@@ -110,7 +110,6 @@
   private SegmentInfos segmentInfos = new SegmentInfos(); // the segments
   private final Directory ramDirectory = new RAMDirectory(); // for temp segs
 
-  private long bufferedDocCount = 0;
   private Lock writeLock;
 
   private int termIndexInterval = DEFAULT_TERM_INDEX_INTERVAL;
@@ -510,7 +509,6 @@
     dw.addDocument(segmentName, doc);
     synchronized (this) {
       segmentInfos.addElement(new SegmentInfo(segmentName, 1, ramDirectory));
-      bufferedDocCount++;
       maybeMergeSegments();
     }
   }
@@ -693,15 +691,6 @@
 
   /** Incremental segment merger.  */
   private final void maybeMergeSegments() throws IOException {
-    /**
-     *  do not bother checking the segment details to determine
-     *  if we should merge, but instead honour the maxBufferedDocs(minMergeDocs)
-     *  property to ensure we do not spend time checking for merge conditions
-     *  
-     */
-    if(bufferedDocCount<minMergeDocs) {
-        return;
-    }
     long targetMergeDocs = minMergeDocs;
     while (targetMergeDocs <= maxMergeDocs) {
       // find segments smaller than current target size
@@ -752,8 +741,6 @@
 
     int mergedDocCount = merger.merge();
 
-    bufferedDocCount -= mergedDocCount; // update bookkeeping about how many docs we have
buffered
-    
     if (infoStream != null) {
       infoStream.println(" into "+mergedName+" ("+mergedDocCount+" docs)");
     }



Mime
View raw message