You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by mi...@apache.org on 2010/02/08 22:19:37 UTC

svn commit: r907803 - /lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/index/IndexWriter.java

Author: mikemccand
Date: Mon Feb  8 21:19:37 2010
New Revision: 907803

URL: http://svn.apache.org/viewvc?rev=907803&view=rev
Log:
clarify that the NRT reader must be closed by the caller

Modified:
    lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/index/IndexWriter.java

Modified: lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/index/IndexWriter.java?rev=907803&r1=907802&r2=907803&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/index/IndexWriter.java (original)
+++ lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/index/IndexWriter.java Mon Feb  8 21:19:37 2010
@@ -396,13 +396,16 @@
    * {#commit} and then using {@link IndexReader#open} to
    * open a new reader.  But the turarnound time of this
    * method should be faster since it avoids the potentially
-   * costly {@link #commit}.<p>
+   * costly {@link #commit}.</p>
+   *
+   * <p>You must close the {@link IndexReader} returned by
+   * this method once you are done using it.</p>
    *
    * <p>It's <i>near</i> real-time because there is no hard
    * guarantee on how quickly you can get a new reader after
    * making changes with IndexWriter.  You'll have to
    * experiment in your situation to determine if it's
-   * faster enough.  As this is a new and experimental
+   * fast enough.  As this is a new and experimental
    * feature, please report back on your findings so we can
    * learn, improve and iterate.</p>
    *
@@ -417,10 +420,11 @@
    * deletes, etc.  This means additional resources (RAM,
    * file descriptors, CPU time) will be consumed.</p>
    *
-   * <p>For lower latency on reopening a reader, you may
-   * want to call {@link #setMergedSegmentWarmer} to
+   * <p>For lower latency on reopening a reader, you should
+   * call {@link #setMergedSegmentWarmer} to
    * pre-warm a newly merged segment before it's committed
-   * to the index.</p>
+   * to the index.  This is important for minimizing
+   * index-to-search delay after a large merge.  </p>
    *
    * <p>If an addIndexes* call is running in another thread,
    * then this reader will only search those segments from