View Source
Lucene only allows one IndexWriter to be open at a time. However, multiple
threads can use this single IndexWriter. This class manages a global
IndexWriter and uses reference counting to determine when it can be closed.
To delete documents, IndexReaders are used but cannot delete while another
IndexWriter or IndexReader has the write lock. A semaphore is used to
serialize delete and add operations. If the shared IndexWriter is open,
concurrent add operations are permitted.
author: Harry Mark author: Brian Wing Shun Chan |