java-user@lucene.apache.org
[Top] [All Lists]

require new comment for IndexWriter.mergeFactor

Subject: require new comment for IndexWriter.mergeFactor
From: Kerang Lv
Date: Sat, 5 Nov 2005 23:28:37 -0800 PST
Does the IndexWriter.mergeFactor remain the same
effect on the RAM use after the introduce of
IndexWriter.minMergeDocs?

The minMergeDocs was introduced into
IndexWriter(Revision 1.21 in cvs) in order to control
the number of
Documents merged in RAMDirectory independently of the
mergeFactor (see
http://issues.apache.org/bugzilla/show_bug.cgi?id=23754).
And the IndexWriter.maybeMergeSegments changed from
then on:

@@ -375,7 +385,7 @@
 
   /** Incremental segment merger.  */
   private final void maybeMergeSegments() throws
IOException {
-    long targetMergeDocs = mergeFactor;
+    long targetMergeDocs = minMergeDocs;

But the comment of mergeFactor remains:

The following is the comment of
IndexWriter.mergeFactor in the 1.2 RC6:
  /** Determines how often segment indexes 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
   * interactively maintained.
   *
   * <p>This must never be less than 2.  The default
value is 10.*/
  public int mergeFactor = 10;


and now, it's in 1.4.3:
  /** Determines how often segment indices are merged
by addDocument().  With
   * smaller values, less RAM is used while indexing,
and searches on
   * 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.*/
  public int mergeFactor = DEFAULT_MERGE_FACTOR;

Does the IndexWriter.mergeFactor remain the same
effect on the RAM use?


                
__________________________________ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: java-user-help@xxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>