lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <yo...@apache.org>
Subject Re: Realtime Search for Social Networks Collaboration
Date Mon, 08 Sep 2008 20:23:36 GMT
On Mon, Sep 8, 2008 at 3:56 PM, Ning Li <ning.li.li@gmail.com> wrote:
> On Mon, Sep 8, 2008 at 2:43 PM, Yonik Seeley <yonik@apache.org> 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?

It seems advantageous to just make it really cheap to get a new view
of the index (if you do it for every search, t amounts to the same
thing, right?)  Quite a bit of code in Lucene assumes a static view of
the Index I think (even IndexSearcher), and it's nice to have a stable
index view for the duration of a single request.

> Similar to InstantiatedIndexReader,
> it will be in sync with an index writer.

Right... that's why I was clarifying.  You can still make stable views
of the index with multiple InstantiatedIndex instances, but it doesn't
seem as efficient.

-Yonik

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


Mime
View raw message