lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Busch <busch...@gmail.com>
Subject Re: Multiple lock files
Date Tue, 08 Aug 2006 17:34:57 GMT

> Yeah. But how do I know if a lock file is related to an index or app? I
> don't want to remove a lock file that another app is using
>
Leandro,

check out the static method of IndexReader: unlock(Directory). Link: 
http://lucene.apache.org/java/docs/api/org/apache/lucene/index/IndexReader.html#unlock(org.apache.lucene.store.Directory)

You can use that method to forcibly unlock a particular index directory. 
Furthermore you can use the method boolean isLocked(Directory) to check 
whether an index is actually locked.

Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message