lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ning Li" <>
Subject Re: Realtime Search for Social Networks Collaboration
Date Mon, 08 Sep 2008 19:56:49 GMT
On Mon, Sep 8, 2008 at 2:43 PM, Yonik Seeley <> wrote:
> But, how would you maintain a static view of an index...?
> IndexReader r1 = indexWriter.getCurrentIndex()
> indexWriter.addDocument(...)
> IndexReader r2 = indexWriter.getCurrentIndex()
> I assume r1 will have a view of the index before the document was
> added, and r2 after?

I thought an index reader which supports real-time search no longer
maintains a static view of an index? Similar to InstantiatedIndexReader,
it will be in sync with an index writer.

IndexReader r = indexWriter.getIndexReader();
getIndexReader() (i.e. get real-time index reader) returns the same
reader instance for a writer instance.

On Mon, Sep 8, 2008 at 12:33 PM, Michael McCandless
<> wrote:
> Flushing is somewhat tricky because any open RAM readers would then have to
> cutover to the newly flushed segment once the flush completes, so that the
> RAM buffer can be recycled for the next segment.

Now this won't be a problem any more.


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

View raw message