You could also use NoLockFactory. Disabling locks just means Lucene stops checking if another writer has the index open (the write.lock file).
It's extremely dangerous to do, unless you are absolutely certain your application level locking properly implements the protection. It will quickly lead to index corruption. I would expect no real performance change, unless you create writers exceptionally often. A read-only index need not disable locks because IndexReader will never attempt to create a lock. (Before 2.1 there was also a commit lock, which IndexReader did create, but as of 2.1 IndexReader is readOnly, unless you use it to do deletions or change norms). Mike On Sat, Aug 15, 2009 at 2:15 AM, Shai Erera<ser...@gmail.com> wrote: > Hi > > If I can guarantee only one JVM will update an index (not at a time - truly > just one JVM), can I disable locks, or is it really necessary only for > read-only devices? If I disable locks, will I see any performance > improvements? > > Thanks > Shai > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org