lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: How to restore corrupted index
Date Sun, 26 Oct 2008 17:52:37 GMT
: i use SimpleFSLockFactory and optimized opened IndexWriter, but i use api to
: forcefully removing the lock file.
: this missing file, just occurs in sometimes not always??

forcibly removing hte lock file isn't something that should be done in a 
typical situation ... if the lock file is there, there's a reason for it, 
and it's not suprising to me that something might break if you forcibly 
remove the lock file while the app is running -- as Michael said, that can 
easily lead to two writers both thinking they have access to write to the 
index.

http://hudson.zones.apache.org/hudson/job/Lucene-trunk/javadoc/org/apache/lucene/index/IndexWriter.html#unlock(org.apache.lucene.store.Directory)
>Forcibly unlocks the index in the named directory.
>
>Caution: this should only be used by failure recovery code, when it is 
>known that no other process nor thread is in fact currently accessing 
>this index. 


-Hoss


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