lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "WATHELET Thomas" <thomas.wathe...@europarl.europa.eu>
Subject RE: Lock File
Date Fri, 30 Jun 2006 13:52:10 GMT
It's not possible to change lockDir because it's a final static
varriables?
Is it possible to change the lockDir?

-----Original Message-----
From: Michael McCandless [mailto:lucene@mikemccandless.com] 
Sent: 29 June 2006 22:26
To: java-user@lucene.apache.org
Subject: Re: Lock File


 > When I create an index withe the class IndexModifier in Lucene 
1.9.1there is a lock file created on a temp folder.
 > My question is: Is it possible to disable this option?
 > If yes how to procede?

Yes, there is.

You can call the static FSDirectory.setDisabledLocks() to disable 
locking entirely.  But you need to be certain this is safe for your 
application.  Lucene uses this lock to ensure the index does not become 
corrupt when IndexReaders and IndexWriters are working on the same
index.

Or, if you want to change which directory the lock file is stored in you

can set this Java property:

    org.apache.lucene.lockDir

Mike

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




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