Skip to content

Apache Lucene open-source search software

small javadoc improvements

Daniel Naber10fb3c64a59e
diff --git a/src/java/org/apache/lucene/search/IndexSearcher.java b/src/java/org/apache/lucene/search/IndexSearcher.java
index f6b9c099bd5..fbe67e9e34f 100644
--- a/src/java/org/apache/lucene/search/IndexSearcher.java
+++ b/src/java/org/apache/lucene/search/IndexSearcher.java
@@ -29,6 +29,9 @@ import org.apache.lucene.index.Term;
* <p>Applications usually need only call the inherited {@link #search(Query)}
* or {@link #search(Query,Filter)} methods. For performance reasons it is
* recommended to open only one IndexSearcher and use it for all of your searches.
+ *
+ * <p>Note that you can only access Hits from an IndexSearcher as long as it is
+ * not yet closed, otherwise an IOException will be thrown.
*/
public class IndexSearcher extends Searcher {
IndexReader reader;
diff --git a/src/java/org/apache/lucene/search/Searcher.java b/src/java/org/apache/lucene/search/Searcher.java
index 1732bb2a929..6ff090f32f3 100644
--- a/src/java/org/apache/lucene/search/Searcher.java
+++ b/src/java/org/apache/lucene/search/Searcher.java
@@ -21,7 +21,10 @@ import java.io.IOException;
import org.apache.lucene.index.Term;
/** An abstract base class for search implementations.
- * Implements some common utility methods.
+ * Implements the main search methods.
+ *
+ * <p>Note that you can only access Hits from a Searcher as long as it is
+ * not yet closed, otherwise an IOException will be thrown.
*/
public abstract class Searcher implements Searchable {