I am googling for two days... I really need help.
I have an application with multiple threads trying to update a lucene index using Open/Close of IndexWriter
for each update. Threads can start at any time.
Yeah, the problem with write.lock
! So there are may be two or more solutions:
1) check IndexWriter.IsLocked(index)
and if it is locked to sleep the thread.
2) Open an IndexWriter
and never close it. The problem is that I have another application using the same index. Also when should I close the index and finalize the whole process?
here are interesting postings
Lucene IndexWriter thread safety
Lucene - open a closed IndexWriter
Update: Exactly 2 years later I did a rest API which wraps this and all writes and reads were routed to the API.