lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aviran" <amo...@infosciences.com>
Subject RE: When does IndexReader pick up changes?
Date Thu, 29 Jul 2004 13:21:59 GMT
IndexReader will pick the changes as it is opened. 
If new documents are added to the index you need to open a new IndexReader
in order for it to pick up the changes

Aviran

-----Original Message-----
From: Stephane James Vaucher [mailto:vauchers@cirano.qc.ca] 
Sent: Thursday, July 29, 2004 0:00 AM
To: Lucene Users List
Subject: Re: When does IndexReader pick up changes?


IIRC, if you use a searcher, changes are picked up right away. With a
reader, I would expect it should react the same way.

<disclaimer>I'm not a lucene guru, I might be wrong</disclaimer> Where I'm
less sure is with a FSDirectory, as it uses an internal RAMDirectory. If two
separate processes (within the same classloader, FS with same paths are
reused) use different FSDirectories, you might notice a flushing behaviour.

sv

On 28 Jul 2004 yahootintin.1247688@bloglines.com wrote:

> Hi,
>
> Does anyone know if the IndexWriter has to be closed for an 
> IndexReader to pick up the changes?
>
> Thanks.
>
> --- Lucene Users List" <lucene-user@jakarta.apache.org
> wrote:
> Hi,
> >
> > If I do this:
> >
> >   - open index writer
> >   - add document
>
> >   - open reader
> >   - search with reader
> >   - close reader
> >   - close
> writer
> >
> > Will the reader pick up the document that
> > was added to the
> index since it was opened
> > after the document was added?  Or will it
> >
> only pick up changes that occur after
> > the index writer is closed?
> >
> > Thanks for the help!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message