Hi, I am a little confused, probably, because I missed some detail when looking through the code of lucene 2.1.
Scenario: Deleting documents works for a while, eventually, I get the exception that obtaining the lock files has timed out. I was trying to find an answer to this. I call IndexReader.deleteDocument() for the _first_ time. If my index has several segments, my IndexReader is actually a MultiReader. Therefore the variable directoryOwner is set to true and as the first step, a lock file is created. After that, the document is marked as deleted. If I call deleteDocument again, it may or may not work. Now by just reading the code, and I am sure I am missing some details, I am wondering, how can I successfully call deleteDocument again? The code will try to obtain the lockfile again, but since it is already there, it will time out. That is the point where I am confused. After I deleted a document, the write.lock file is still there, and directoryOwner is still true. Maybe knowing more about this will help me to find out why I get the exception "Lock obtain timed out" after a while and after several successful document deletions. Thank you! Regards, Martin
pgp43J6vYhrDA.pgp
Description: PGP signature