Hi Shai, > have other uses as well? What about multiple IndexWriters from the same > JVM?
This also needs a lock. But if it is guaranteed to only have one JVM accessing the index, you can use an in-JVM-Locking mechanism which is provided by http://lucene.apache.org/java/3_0_0/api/all/org/apache/lucene/store/SingleIn stanceLockFactory.html > If NoLockFactory is not safe, then we can move to SimpleFSLockFactory, and > since we can guarantee by other means that only one IndexWriter attempts > to > write to the index, we can IndexWriter.unlock(Dir) if the lock exists. If you can guarantee that you only have *one* JVM and there may be multiple IndexWriters, use above solution. Uwe --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org