You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Yonghui Zhao <zh...@gmail.com> on 2016/04/15 09:04:04 UTC

Lucene warm up

As we know when a new IndexReader is create, search performance is very bad.
So we should warm up the reader before serving real traffic.

A simple way is to send some mocked queries.

Is there any elegant or built-in method?

Thanks

Re: Lucene warm up

Posted by Michael McCandless <lu...@mikemccandless.com>.
Well, you could invoke it manually yourself, to warm up a just-opened reader?

But it may be better to run "typical" known queries instead, since
that will tickle the index parts that your application uses...

Mike McCandless

http://blog.mikemccandless.com


On Fri, Apr 15, 2016 at 7:38 AM, Yonghui Zhao <zh...@gmail.com> wrote:
> Thanks Michael.
>
> Will this also help restart  of service with static index?
>
> 2016-04-15 17:30 GMT+08:00 Michael McCandless <lu...@mikemccandless.com>:
>
>> There is also SimpleMergedSegmentWarmer, which you can set on
>> IndexWriterConfig when you create IndexWriter so that it pre-warms
>> newly merged segments before making them visible to the next
>> near-real-time reader.
>>
>> Mike McCandless
>>
>> http://blog.mikemccandless.com
>>
>>
>> On Fri, Apr 15, 2016 at 3:04 AM, Yonghui Zhao <zh...@gmail.com>
>> wrote:
>> > As we know when a new IndexReader is create, search performance is very
>> bad.
>> > So we should warm up the reader before serving real traffic.
>> >
>> > A simple way is to send some mocked queries.
>> >
>> > Is there any elegant or built-in method?
>> >
>> > Thanks
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>

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


Re: Lucene warm up

Posted by Yonghui Zhao <zh...@gmail.com>.
Thanks Michael.

Will this also help restart  of service with static index?

2016-04-15 17:30 GMT+08:00 Michael McCandless <lu...@mikemccandless.com>:

> There is also SimpleMergedSegmentWarmer, which you can set on
> IndexWriterConfig when you create IndexWriter so that it pre-warms
> newly merged segments before making them visible to the next
> near-real-time reader.
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
>
> On Fri, Apr 15, 2016 at 3:04 AM, Yonghui Zhao <zh...@gmail.com>
> wrote:
> > As we know when a new IndexReader is create, search performance is very
> bad.
> > So we should warm up the reader before serving real traffic.
> >
> > A simple way is to send some mocked queries.
> >
> > Is there any elegant or built-in method?
> >
> > Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Re: Lucene warm up

Posted by Michael McCandless <lu...@mikemccandless.com>.
There is also SimpleMergedSegmentWarmer, which you can set on
IndexWriterConfig when you create IndexWriter so that it pre-warms
newly merged segments before making them visible to the next
near-real-time reader.

Mike McCandless

http://blog.mikemccandless.com


On Fri, Apr 15, 2016 at 3:04 AM, Yonghui Zhao <zh...@gmail.com> wrote:
> As we know when a new IndexReader is create, search performance is very bad.
> So we should warm up the reader before serving real traffic.
>
> A simple way is to send some mocked queries.
>
> Is there any elegant or built-in method?
>
> Thanks

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