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 Tue, 18 Nov 2003 11:58:19 GMT
otis        2003/11/18 03:58:19

  Modified:    src/java/org/apache/lucene/index IndexWriter.java
  Log:
  - Patch from case 23754:
  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23754
  
  Revision  Changes    Path
  1.21      +11 -1     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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- IndexWriter.java	25 Oct 2003 13:54:08 -0000	1.20
  +++ IndexWriter.java	18 Nov 2003 11:58:19 -0000	1.21
  @@ -275,6 +275,16 @@
      *
      * <p>This must never be less than 2.  The default value is 10.*/
     public int mergeFactor = 10;
  +  
  +  /** Determines the minimal number of documents required before the buffered
  +   * in-memory documents are merging and a new Segment is created.
  +   * Since Documents are merged in a {@link org.apache.lucene.store.RAMDirectory},
  +   * large value gives faster indexing.  At the same time, mergeFactor limits
  +   * the number of files open in a FSDirectory.
  +   * 
  +   * <p> The default value is 10.*/
  +  public int minMergeDocs = 10;
  +
   
     /** Determines the largest number of documents ever merged by addDocument().
      * Small values (e.g., less than 10,000) are best for interactive indexing,
  @@ -375,7 +385,7 @@
   
     /** Incremental segment merger.  */
     private final void maybeMergeSegments() throws IOException {
  -    long targetMergeDocs = mergeFactor;
  +    long targetMergeDocs = minMergeDocs;
       while (targetMergeDocs <= maxMergeDocs) {
         // find segments smaller than current target size
         int minSegment = segmentInfos.size();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message