Thank you for quick and detailed answer.
In this system multiple threads will, occasionally, try to write and/ or 
read the same index, hence the pause waiting for the lock. This is not a 
good way to implement it and was done as a temp solution for debug 
purposes only. Multiple processes may still reach the init of IndexWriter/ 
IndexReader for the same index at almost the same time. I guess 
synchronizing some object, giving exclusive access for one IndexReader or 
IndexWriter to some common index, is a better way to do it. May this be a 
work around for the parallel writer/ reader problem you describe? Anyway, 
I guess I should give the trunc a try first.
java.io.IOException: Access is denied has only been reported once. I have 
not been able to reproduce it. I have some anti virus app running on my 
machine (Trend Micro Office Scan). This includes a scan of the index dir. 
Do you think that may cause the problem. Or perhaps some other windows 
services/ tools accessing the file for some reason (windows indexer)?

Reply via email to