# Warmup API

**URL:** <https://discuss.elastic.co/t/warmup-api/10264>\
**Category:** Elasticsearch\
**Created:** [January 8, 2013, 5:52pm UTC](https://discuss.elastic.co/t/warmup-api/10264 "2013-01-08T17:52:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrej](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Andrej](https://discuss.elastic.co/u/Andrej)\
**Post date:** [January 8, 2013, 5:52pm UTC](https://discuss.elastic.co/t/warmup-api/10264/1 "2013-01-08T17:52:33Z")

</div>

Hi,

two short questions about warmup API:

First, issue #1913 mentions a get warmer method. I couldnt find anything  
like this in the java api, can someone point me to some code or give me  
some buzzwords to look at in the javadoc?  
And second, how does warming up interfer with optimization? Is warming up  
also triggered when segments are merged? Can I manually trigger warmup  
method by calling refresh on an index?

Thanks a lot!  
Andrej

--

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [January 9, 2013, 12:25am UTC](https://discuss.elastic.co/t/warmup-api/10264/2 "2013-01-09T00:25:20Z")

</div>

You can find some examples of handling warmers in the integration tests:  
[https://github.com/elasticsearch/elasticsearch/tree/master/src/test/java/org/elasticsearch/test/integration/indices/wamer](https://github.com/elasticsearch/elasticsearch/tree/master/src/test/java/org/elasticsearch/test/integration/indices/wamer)

Warmers are triggered by creation of new segments, so refresh and optimize  
will most likely trigger warmers. Manually calling refresh will trigger  
warmup only if it will result in new segment creation. If you will call  
refresh over and over again without actually indexing anything, warmer will  
not be triggered.

If you don't want warmers to interfere with optimization, you can temporary  
disable warmers by setting index.warmer.enabled to false in the index  
settings.

To get a better idea when warmers are running on your particular indices  
and queries set indices.warmer to the TRACE level in the logging.yml file.  
It will cause elasticsearch to print a message in the log file every time  
warmer is triggered.

On Tuesday, January 8, 2013 12:52:33 PM UTC-5, Andrej Rosenheinrich wrote:

> Hi,
> 
> two short questions about warmup API:
> 
> First, issue #1913 mentions a get warmer method. I couldnt find anything  
> like this in the java api, can someone point me to some code or give me  
> some buzzwords to look at in the javadoc?  
> And second, how does warming up interfer with optimization? Is warming up  
> also triggered when segments are merged? Can I manually trigger warmup  
> method by calling refresh on an index?
> 
> Thanks a lot!  
> Andrej

--

---

<div class="post-metadata">

**Author:** ![Andrej](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Andrej](https://discuss.elastic.co/u/Andrej)\
**Post date:** [January 9, 2013, 9:47am UTC](https://discuss.elastic.co/t/warmup-api/10264/3 "2013-01-09T09:47:08Z")

</div>

Igor, thanks for your explanations and pointing to the tests, that helped  
me a lot! What I am trying to do is to actually check if warmer are  
registered on an index, so I can retrieve them and use this information  
when copying an index (basicly as part of a clone like method). As a  
suggestion, maybe it would be handy to add something like a  
getWarmerSearchRequests method to the Warmup API, reading byte arrays from  
Metadata and creating new search requests by hand all the time is not so  
comfortable 😉

Thanks again!  
Andrej

Am Mittwoch, 9. Januar 2013 01:25:20 UTC+1 schrieb Igor Motov:

> You can find some examples of handling warmers in the integration tests:  
> [https://github.com/elasticsearch/elasticsearch/tree/master/src/test/java/org/elasticsearch/test/integration/indices/wamer](https://github.com/elasticsearch/elasticsearch/tree/master/src/test/java/org/elasticsearch/test/integration/indices/wamer)
> 
> Warmers are triggered by creation of new segments, so refresh and optimize  
> will most likely trigger warmers. Manually calling refresh will trigger  
> warmup only if it will result in new segment creation. If you will call  
> refresh over and over again without actually indexing anything, warmer will  
> not be triggered.
> 
> If you don't want warmers to interfere with optimization, you can  
> temporary disable warmers by setting index.warmer.enabled to false in the  
> index settings.
> 
> To get a better idea when warmers are running on your particular indices  
> and queries set indices.warmer to the TRACE level in the logging.yml file.  
> It will cause elasticsearch to print a message in the log file every time  
> warmer is triggered.
> 
> On Tuesday, January 8, 2013 12:52:33 PM UTC-5, Andrej Rosenheinrich wrote:
> 
> > Hi,
> > 
> > two short questions about warmup API:
> > 
> > First, issue #1913 mentions a get warmer method. I couldnt find anything  
> > like this in the java api, can someone point me to some code or give me  
> > some buzzwords to look at in the javadoc?  
> > And second, how does warming up interfer with optimization? Is warming up  
> > also triggered when segments are merged? Can I manually trigger warmup  
> > method by calling refresh on an index?
> > 
> > Thanks a lot!  
> > Andrej

--

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:57am UTC](https://discuss.elastic.co/t/warmup-api/10264/4 "2017-07-06T02:57:16Z")

</div>


