On Tue, Oct 13, 2009 at 5:23 AM, Ganesh <emailg...@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-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to