lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Willnauer" <simon.willna...@googlemail.com>
Subject Re: Multiple lock files
Date Tue, 08 Aug 2006 17:52:54 GMT
The index writer creates the lock in its constructor via the public
FSDirectory makeLock method.

regards simon

On 8/8/06, Leandro Saad <leandro.saad@gmail.com> wrote:
> 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 <buschmic@gmail.com> 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: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
>
>
> --
> Leandro Rodrigo Saad Cruz
> CTO - InterBusiness Technologies
> db.apache.org/ojb
> guara-framework.sf.net
> xingu.sf.net
>
>

---------------------------------------------------------------------
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