From 58b11acbaff3efbc71fb535455930dabf0c5b538 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Tue, 24 Nov 2009 09:53:53 +0000 Subject: [PATCH] clarify that the NRT reader must be closed by the caller git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@883640 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/lucene/index/IndexWriter.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/lucene/index/IndexWriter.java b/src/java/org/apache/lucene/index/IndexWriter.java index 1b68ec049a0..9ec3b66df5b 100644 --- a/src/java/org/apache/lucene/index/IndexWriter.java +++ b/src/java/org/apache/lucene/index/IndexWriter.java @@ -320,7 +320,10 @@ public class IndexWriter implements Closeable { * {#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}.

+ * costly {@link #commit}.

+ * + *

You must close the {@link IndexReader} returned by + * this method once you are done using it.

* *

It's near real-time because there is no hard * guarantee on how quickly you can get a new reader after