lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Locks and Readers and Writers
Date Fri, 29 Oct 2004 16:07:41 GMT
Hi Christoph,

Thats what I thought.  But what I'm seeing is this:
- open
reader for searching
(the reader is opening an index on a remote machine
(via UNC) which takes a couple seconds)
- meanwhile the other service opens
an IndexWriter and adds a document
(the index writer determines that it needs
to merge so it tries to get a lock.  since the reader is still opening, the
IO exception is thrown)

I believe that increasing the merge factor will
reduce the opportunity for this to occur.  But it will still occur at some


--- Lucene Users List" <
Morus Walter wrote:
> >>AFAIK you should never open an IndexWriter
and an IndexReader at the 
> >>same time. You should use only one of them
at a time but you may open as 
> >>many IndexSearchers as you like for searching.

> > 
> > You cannot open an IndexSearcher without opening an IndexReader
> > or implicitly).
> I should have been more specific.
The IndexReader which gets opened by 
> an IndexSearcher will never have
any changes to commit. So there will 
> never be a problem with locks. As
soon as you use an IndexReader to 
> modify your index (delete doc for example)
you should not have another 
> IndexReader or IndexWriter open or you will
probably get problems with 
> the locks.
> Christoph
> ---------------------------------------------------------------------

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

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

View raw message