Index: src/java/org/apache/lucene/search/IndexSearcher.java =================================================================== --- src/java/org/apache/lucene/search/IndexSearcher.java (revision 798959) +++ src/java/org/apache/lucene/search/IndexSearcher.java (working copy) @@ -36,6 +36,14 @@ * *
Note that you can only access Hits from an IndexSearcher as long as it is * not yet closed, otherwise an IOException will be thrown. + * + *
NOTE: {@link
+ * IndexSearcher} instances are completely
+ * thread safe, meaning multiple threads can call any of its
+ * methods, concurrently. If your application requires
+ * external synchronization, you should not
+ * synchronize on the IndexSearcher instance;
+ * use your own (non-Lucene) objects instead.
NOTE: {@link
+ IndexReader} instances are completely thread
+ safe, meaning multiple threads can call any of its methods,
+ concurrently. If your application requires external
+ synchronization, you should not synchronize on the
+ IndexReader instance; use your own
+ (non-Lucene) objects instead.
+
@version $Id$
*/
public abstract class IndexReader implements Cloneable {
Index: src/java/org/apache/lucene/index/IndexWriter.java
===================================================================
--- src/java/org/apache/lucene/index/IndexWriter.java (revision 798959)
+++ src/java/org/apache/lucene/index/IndexWriter.java (working copy)
@@ -191,10 +191,10 @@
IndexWriter} instances are completely thread
safe, meaning multiple threads can call any of its
methods, concurrently. If your application requires
- external synchronization, you should not use the
- IndexWriter instance for synchronization as
- this can lead to deadlock. Use a private
- Object instead.
IndexWriter instance as
+ this may cause deadlock; use your own (non-Lucene) objects
+ instead.
*/
/*