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.

*/ public class IndexSearcher extends Searcher { IndexReader reader; Index: src/java/org/apache/lucene/index/IndexReader.java =================================================================== --- src/java/org/apache/lucene/index/IndexReader.java (revision 798959) +++ src/java/org/apache/lucene/index/IndexReader.java (working copy) @@ -67,6 +67,14 @@ if you want to make changes with the resulting IndexReader.

+

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.

+ external synchronization, you should not + synchronize on the IndexWriter instance as + this may cause deadlock; use your own (non-Lucene) objects + instead.

*/ /*