Wrap the writing code in a try{ ... }finally{ ... } and on the finally close the writer (and maybe even optimize).
-----Original Message----- From: Santanu Dutta [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 24, 2005 4:08 PM To: java-user@lucene.apache.org Cc: [EMAIL PROTECTED] Subject: RE: tf=0 while lucene is finding matches? Hi All java.io.IOException: Lock obtain timed out: [EMAIL PROTECTED]:\WINNT\TEMP\lucene-4bf302dec76f27bff81fc3dd3118abbb-write.lock at org.apache.lucene.store.Lock.obtain(Lock.java:58) Sometimes it happens and it again start working if I remove the lock file from the temp directory. I didn't get any permanent solution. Sometimes it corrupts the index itself. So can anybody provide some solution for this? Santanu --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]