lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o...@apache.org
Subject cvs commit: jakarta-lucene/src/java/org/apache/lucene/index IndexWriter.java
Date Mon, 15 Sep 2003 12:40:23 GMT
otis        2003/09/15 05:40:23

  Modified:    src/java/org/apache/lucene/index IndexWriter.java
  Log:
  - Fixed docCount() with a patch provided by Christoph Goller.
  
  Revision  Changes    Path
  1.15      +6 -6      jakarta-lucene/src/java/org/apache/lucene/index/IndexWriter.java
  
  Index: IndexWriter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/index/IndexWriter.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- IndexWriter.java	12 Aug 2003 15:05:03 -0000	1.14
  +++ IndexWriter.java	15 Sep 2003 12:40:23 -0000	1.15
  @@ -239,12 +239,12 @@
       return "_" + Integer.toString(segmentInfos.counter++, Character.MAX_RADIX);
     }
   
  -  /** Determines how often segment indexes are merged by addDocument().  With
  +  /** Determines how often segment indices are merged by addDocument().  With
      * smaller values, less RAM is used while indexing, and searches on
  -   * unoptimized indexes are faster, but indexing speed is slower.  With larger
  -   * values more RAM is used while indexing and searches on unoptimized indexes
  -   * are slower, but indexing is faster.  Thus larger values (> 10) are best
  -   * for batched index creation, and smaller values (< 10) for indexes that are
  +   * unoptimized indices are faster, but indexing speed is slower.  With larger
  +   * values, more RAM is used during indexing, and while searches on unoptimized
  +   * indices are slower, indexing is faster.  Thus larger values (> 10) are best
  +   * for batch index creation, and smaller values (< 10) for indices that are
      * interactively maintained.
      *
      * <p>This must never be less than 2.  The default value is 10.*/
  @@ -355,7 +355,7 @@
         if ((reader.directory == this.directory) || // if we own the directory
             (reader.directory == this.ramDirectory))
   	segmentsToDelete.addElement(reader);	  // queue segment for deletion
  -      mergedDocCount += si.docCount;
  +      mergedDocCount += reader.numDocs();
       }
       if (infoStream != null) {
         infoStream.println();
  
  
  

Mime
View raw message