lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Forcing an IndexReader to read-only
Date Thu, 31 Aug 2006 18:21:10 GMT

: Even if it's very briefly whilst opening the index - a writelock is a
: writelock. If anyone has any trick to work around these locks (how brief

I didn't say "writelock" i said "lock" .... specifically it's a "commit
lock" that's used, and if there is any possibility whatsoever that some
other IndexReader or IndexWriter will be attempting to modify the index at
the moment you are opening your IndexReader, that commit lock is
neccessary to ensure that your reader gets a uniform list of the segments.

If you are 100% certain that your indiex can't be modified at any time
(ie: it's on a CD or something like that) you can use the
FSDirectory.setDisableLocks(true) method to tell Lucene not to bother.


View raw message