You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@lucene.apache.org by Fredrik Andersson <fi...@gmail.com> on 2006/09/01 09:49:43 UTC

Re: Forcing an IndexReader to read-only

Hossman, thank you! Exactly what I was looking for. And I know the
application of "locks", it's just a little peculiar situation right now
which requires this... "fix" : )

Fredrik

On 8/31/06, Chris Hostetter <ho...@fucit.org> wrote:
>
>
> : 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.
>
> -Hoss
>
>