lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <>
Subject RE: Best Locking approach (Directory Lock)
Date Wed, 02 Dec 2009 13:03:07 GMT
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

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


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message