On Mon, Sep 8, 2008 at 2:43 PM, Yonik Seeley <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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. Cheers, Ning --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]