lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r883866 - /lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java
Date Tue, 24 Nov 2009 20:45:20 GMT
Author: mikemccand
Date: Tue Nov 24 20:45:20 2009
New Revision: 883866

URL: http://svn.apache.org/viewvc?rev=883866&view=rev
Log:
improve IW.optimize() docs

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.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=883866&r1=883865&r2=883866&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 Tue Nov 24 20:45:20
2009
@@ -2164,16 +2164,17 @@
    * default merge policy, but individual merge policies may implement
    * optimize in different ways.
    *
-   * <p>It is recommended that this method be called upon completion of indexing. 
In
-   * environments with frequent updates, optimize is best done during low volume times, if
at all. 
-   * 
-   * </p>
-   * <p>See http://www.gossamer-threads.com/lists/lucene/java-dev/47895 for more discussion.
</p>
+   * <p> Optimize is a fairly costly operation, so you
+   * should only do it if your search performance really
+   * requires it.  Many search applications do fine never
+   * calling optimize. </p>
    *
    * <p>Note that optimize requires 2X the index size free
    * space in your Directory.  For example, if your index
    * size is 10 MB then you need 20 MB free for optimize to
-   * complete.</p>
+   * complete.  Also, it's best to call {@link #commit()}
+   * after the optimize completes to allow IndexWriter to
+   * free up disk space.</p>
    *
    * <p>If some but not all readers re-open while an
    * optimize is underway, this will cause > 2X temporary



Mime
View raw message