I have been working on the Internet for two days ... I really need help.
I have an application with multiple threads trying to update the lucene index using the Open / Close IndexWriter for each update. Themes can start at any time.
Yes, the problem is with write.lock ! Thus, there can be two or more solutions:
1) check IndexWriter.IsLocked(index) , and if it is blocked, to sleep the thread.
2) Open 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 complete the whole process?
here are interesting publications
Lucene IndexWriter Stream Security
Lucene - open a private IndexWriter
Update: After about 2 years, I made a leisure API that wraps this , and all records and readings have been redirected to the API.
source share