lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r585572 - in /lucene/java/trunk/src/java/org/apache/lucene/index: IndexWriter.java LogByteSizeMergePolicy.java LogMergePolicy.java
Date Wed, 17 Oct 2007 16:54:23 GMT
Author: mikemccand
Date: Wed Oct 17 09:54:22 2007
New Revision: 585572

URL: http://svn.apache.org/viewvc?rev=585572&view=rev
Log:
LUCENE-1012: correct the javadocs for maxMergeDocs / maxMergeMB to state that the limit applies
to each segment being merged, not to the resulting merged segment

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java
    lucene/java/trunk/src/java/org/apache/lucene/index/LogByteSizeMergePolicy.java
    lucene/java/trunk/src/java/org/apache/lucene/index/LogMergePolicy.java

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=585572&r1=585571&r2=585572&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 Wed Oct 17 09:54:22
2007
@@ -774,25 +774,33 @@
     return mergeScheduler;
   }
 
-  /** Determines the largest number of documents ever merged by addDocument().
-   * Small values (e.g., less than 10,000) are best for interactive indexing,
-   * as this limits the length of pauses while indexing to a few seconds.
-   * Larger values are best for batched indexing and speedier searches.
+  /** <p>Determines the largest segment (measured by
+   * document count) that may be merged with other segments.
+   * Small values (e.g., less than 10,000) are best for
+   * interactive indexing, as this limits the length of
+   * pauses while indexing to a few seconds.  Larger values
+   * are best for batched indexing and speedier
+   * searches.</p>
    *
-   * <p>The default value is {@link Integer#MAX_VALUE}.
+   * <p>The default value is {@link Integer#MAX_VALUE}.</p>
    *
    * <p>Note that this method is a convenience method: it
    * just calls mergePolicy.setMaxMergeDocs as long as
    * mergePolicy is an instance of {@link LogMergePolicy}.
    * Otherwise an IllegalArgumentException is thrown.</p>
+   *
+   * <p>The default merge policy ({@link
+   * LogByteSizeMergePolicy}) also allows you to set this
+   * limit by net size (in MB) of the segment, using {@link
+   * LogByteSizeMergePolicy#setMaxMergeMB}.</p>
    */
   public void setMaxMergeDocs(int maxMergeDocs) {
     getLogMergePolicy().setMaxMergeDocs(maxMergeDocs);
   }
 
-   /**
-   * Returns the largest number of documents allowed in a
-   * single segment.
+  /**
+   * <p>Returns the largest segment (measured by document
+   * count) that may be merged with other segments.</p>
    *
    * <p>Note that this method is a convenience method: it
    * just calls mergePolicy.getMaxMergeDocs as long as

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/LogByteSizeMergePolicy.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/LogByteSizeMergePolicy.java?rev=585572&r1=585571&r2=585572&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/LogByteSizeMergePolicy.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/LogByteSizeMergePolicy.java Wed Oct
17 09:54:22 2007
@@ -39,16 +39,24 @@
     return info.sizeInBytes();
   }
 
-  /** Sets the maximum size for a segment to be merged.
-   *  When a segment is this size or larger it will never be
-   *  merged.  Note that {@link #setMaxMergeDocs} is also
+  /** <p>Determines the largest segment (measured by total
+   *  byte size of the segment's files, in MB) that may be
+   *  merged with other segments.  Small values (e.g., less
+   *  than 50 MB) are best for interactive indexing, as this
+   *  limits the length of pauses while indexing to a few
+   *  seconds.  Larger values are best for batched indexing
+   *  and speedier searches.</p>
+   *
+   *  <p>Note that {@link #setMaxMergeDocs} is also
    *  used to check whether a segment is too large for
-   *  merging (it's either or). */
+   *  merging (it's either or).</p>*/
   public void setMaxMergeMB(double mb) {
     maxMergeSize = (long) (mb*1024*1024);
   }
 
-  /** Get the maximum size for a segment to be merged.
+  /** Returns the largest segment (meaured by total byte
+   *  size of the segment's files, in MB) that may be merged
+   *  with other segments.
    *  @see #setMaxMergeMB */
   public double getMaxMergeMB() {
     return ((double) maxMergeSize)/1024/1024;

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/LogMergePolicy.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/LogMergePolicy.java?rev=585572&r1=585571&r2=585572&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/LogMergePolicy.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/LogMergePolicy.java Wed Oct 17 09:54:22
2007
@@ -309,14 +309,27 @@
     return spec;
   }
 
-  /** Sets the maximum docs for a segment to be merged.
-   *  When a segment has this many docs or more it will never be
-   *  merged. */
+  /** <p>Determines the largest segment (measured by
+   * document count) that may be merged with other segments.
+   * Small values (e.g., less than 10,000) are best for
+   * interactive indexing, as this limits the length of
+   * pauses while indexing to a few seconds.  Larger values
+   * are best for batched indexing and speedier
+   * searches.</p>
+   *
+   * <p>The default value is {@link Integer#MAX_VALUE}.</p>
+   *
+   * <p>The default merge policy ({@link
+   * LogByteSizeMergePolicy}) also allows you to set this
+   * limit by net size (in MB) of the segment, using {@link
+   * LogByteSizeMergePolicy#setMaxMergeMB}.</p>
+   */
   public void setMaxMergeDocs(int maxMergeDocs) {
     this.maxMergeDocs = maxMergeDocs;
   }
 
-  /** Get the maximum docs for a segment to be merged.
+  /** Returns the largest segment (measured by document
+   *  count) that may be merged with other segments.
    *  @see #setMaxMergeDocs */
   public int getMaxMergeDocs() {
     return maxMergeDocs;



Mime
View raw message