lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: When Index is Updated Frequently
Date Fri, 04 Mar 2011 18:45:05 GMT
On Fri, Mar 4, 2011 at 10:09 AM, Bing Li <lblabs@gmail.com> wrote:

> According to my experiences, when the Lucene index updated frequently, its
> performance must become low. Is it correct?

In fact Lucene can gracefully handle a high rate of updates with low
latency turnaround on the readers, using the near-real-time (NRT) API
-- IndexWriter.getReader() (or in soon-to-be 31,
IndexReader.open(IndexWriter)).

NRT is really something a hybrid of "eventual consistency" and
"immediate consistency", because it lets your app have full control
over how quickly changes must be visible by controlling when you
pull a new NRT reader.

That said, Lucene can't offer true immediate consistency at a high
update rate -- the time to open a new NRT reader is usually too costly
to do, eg, for every search.  But eg every 100 msec (say) is
reasonable (depending on many variables...).

So... for your app you should run some tests and see.  And please
report back.

(But, unfortunately, NRT hasn't been exposed in Solr yet...).

-- 
Mike

http://blog.mikemccandless.com

Mime
View raw message