You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2012/08/14 13:05:33 UTC

svn commit: r1372839 - /lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java

Author: rmuir
Date: Tue Aug 14 11:05:32 2012
New Revision: 1372839

URL: http://svn.apache.org/viewvc?rev=1372839&view=rev
Log:
document what IW.close is doing and how to 'actually close' if you want that

Modified:
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java?rev=1372839&r1=1372838&r2=1372839&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java Tue Aug 14 11:05:32 2012
@@ -763,8 +763,15 @@ public class IndexWriter implements Clos
   }
 
   /**
-   * Commits all changes to an index and closes all
-   * associated files.  Note that this may be a costly
+   * Commits all changes to an index, waits for pending merges
+   * to complete, and closes all associated files.  
+   * <p>
+   * This is a "slow graceful shutdown" which may take a long time
+   * especially if a big merge is pending: If you only want to close
+   * resources use {@link #rollback()}. If you only want to commit
+   * pending changes and close resources see {@link #close(boolean)}.
+   * <p>
+   * Note that this may be a costly
    * operation, so, try to re-use a single writer instead of
    * closing and opening a new one.  See {@link #commit()} for
    * caveats about write caching done by some IO devices.