lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Realtime search best practices
Date Tue, 13 Oct 2009 10:20:35 GMT
On Tue, Oct 13, 2009 at 5:23 AM, Ganesh <emailgane@yahoo.co.in> wrote:

> In case of 2.4.1, the reader after reopen, will be warmed before actual use.

You mean you must warm it after you call reopen, before using it, right?

> In 2.9, public void setMergedSegmentWarmer(IndexWriter.IndexReaderWarmer warmer), does
warming when we do getReader().

Right, and this is better that doing your own warming after calling
getReader because warming of newly merged segments won't block your
near real-time turnaround.

> If we do getReader() for every request then whether it will reduce the search performance?

For every search request?  Yes this will always reduce performance,
even worse than simply calling reopen for every search request,
because getReader() forces the writer to flush a new segment.

> Does warming necessarly required in 2.9? If we do warming for the very first time is
not enough? Do we need to do it on every request?

It's not "required", but if you don't do it it means the first search
to land after a getReader will pay that warming cost.

Often this cost is negligible.  But, rarely, once a very large segment
merge has completed, the warming of that newly merged segment could be
very large.  This is heavily dependent on the size of your index,
whether your queries are using the FieldCache (doing field sorting, or
using function queries), etc.

Mike

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


Mime
View raw message