Apache Lucene open-source search software
fix stale javadocs
Michael McCandless9fdf96c92bd0
diff --git a/lucene/src/java/org/apache/lucene/search/IndexSearcher.java b/lucene/src/java/org/apache/lucene/search/IndexSearcher.javaindex f199edc92c6..8429ec0c9af 100644--- a/lucene/src/java/org/apache/lucene/search/IndexSearcher.java+++ b/lucene/src/java/org/apache/lucene/search/IndexSearcher.java@@ -46,8 +46,18 @@ import org.apache.lucene.util.ThreadInterruptedException;** <p>Applications usually need only call the inherited* {@link #search(Query,int)}- * or {@link #search(Query,Filter,int)} methods. For performance reasons it is- * recommended to open only one IndexSearcher and use it for all of your searches.+ * or {@link #search(Query,Filter,int)} methods. For+ * performance reasons, if your index is unchanging, you+ * should share a single IndexSearcher instance across+ * multiple searches instead of creating a new one+ * per-search. If your index has changed and you wish to+ * see the changes reflected in searching, you should+ * use {@link IndexReader#reopen} to obtain a new reader and+ * then create a new IndexSearcher from that. Also, for+ * low-latency turnaround it's best to use a near-real-time+ * reader ({@link IndexReader#open(IndexWriter,boolean)}).+ * Once you have a new {@link IndexReader}, it's relatively+ * cheap to create a new IndexSearcher from it.** <a name="thread-safety"></a><p><b>NOTE</b>: <code>{@link* IndexSearcher}</code> instances are completely