lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fredrik Andersson" <fidde.anders...@gmail.com>
Subject Re: Forcing an IndexReader to read-only
Date Fri, 01 Sep 2006 07:49:43 GMT
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 <hossman_lucene@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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message