I'm trying to use them, and I maybe be wrong, but I can't unlock the dir
before I create the Directory right? Do you know if the lock is created when
I create the Directory?

:: Leandro

On 8/8/06, Michael Busch <[EMAIL PROTECTED]> wrote:


> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Leandro Rodrigo Saad Cruz
CTO - InterBusiness Technologies
db.apache.org/ojb
guara-framework.sf.net
xingu.sf.net

Reply via email to