# Immediate index warmup after documents are reindexed

**URL:** <https://discuss.elastic.co/t/immediate-index-warmup-after-documents-are-reindexed/8190>\
**Category:** Elasticsearch\
**Created:** [June 22, 2012, 6:54am UTC](https://discuss.elastic.co/t/immediate-index-warmup-after-documents-are-reindexed/8190 "2012-06-22T06:54:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ywtsang](https://avatars.discourse-cdn.com/v4/letter/y/a698b9/32.png) [@ywtsang](https://discuss.elastic.co/u/ywtsang)\
**Post date:** [June 22, 2012, 6:54am UTC](https://discuss.elastic.co/t/immediate-index-warmup-after-documents-are-reindexed/8190/1 "2012-06-22T06:54:08Z")

</div>

My index size is around 61.7gb with around 7million documents, 10  
shards and 1 replica.

Queries with filters and facets works nicely, well belows 500ms.

I met random slowness (around 1 to 3 seconds) on queries with filters  
and facets after documents are reindexed, no matter the queries yield  
small results (around 50 to 200 results) or large results. If the  
queries run 1 to 2 more times, it becomes fast.

I read about "Percolate API" and it can be used to register queries to  
warmup index after reindexing documents? But using the percolate to  
find and execute the matched queries still do not guarantee the  
indexes are well warmup-ed? Because our indexes are being queried  
continuously by others at the same time of reindexing. And we are  
using bulk index and it seems difficult to use Percolate here.

So how we can effectively warmup the indexes so that queries will not  
get this 1 to 3 seconds slowness?

Wing

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [June 22, 2012, 7:33am UTC](https://discuss.elastic.co/t/immediate-index-warmup-after-documents-are-reindexed/8190/2 "2012-06-22T07:33:15Z")

</div>

> So how we can effectively warmup the indexes so that queries will not  
> get this 1 to 3 seconds slowness?

Due out in 0.20: warmup API

> <https://github.com/elastic/elasticsearch/issues/1913>
>
> Index warming allows to run registered search requests to warm up the index befo…re it is available for search. With the near real time aspect of search, cold data (segments) will be warmed up before they become available for search.
> 
> Warmup searches typically include requests that require heavy loading of data, such as faceting or sorting on specific fields.
> 
> The warmup APIs allows to register warmup (search) under specific names, remove them, and get them.
> 
> Index warmup can be disabled by setting \`index.warmer.enabled\` to \`false\`. It is supported as a realtime setting using update settings API. This can be handy when doing initial bulk indexing, disabling pre registered warmers to make indexing faster and less expensive and then enable it.
> \## Put Warmer
> 
> Allows to put a warmup search request on a specific index (or indices), with the body composing of a regular search request. Types can be provided as part of the URI if the search request is designed to be run only against the specific types.
> 
> Here is an example that registers a warmup called \`warmer\_1\` against index \`test\` (can be alias or several indices), for a search request that runs against all types:
> 
> \`\`\`
> curl -XPUT localhost:9200/test/\_warmer/warmer\_1 -d '{
> "query" : {
> "match\_all" : {}
> },
> "facets" : {
> "facet\_1" : {
> "terms" : {
> "field" : "field"
> }
> } 
> }
> }'
> \`\`\`
> 
> And an example that registers a warmup against specific types:
> 
> \`\`\`
> curl -XPUT localhost:9200/test/type1/\_warmer/warmer\_1 -d '{
> "query" : {
> "match\_all" : {}
> },
> "facets" : {
> "facet\_1" : {
> "terms" : {
> "field" : "field"
> }
> } 
> }
> }'
> \`\`\`
> \## Delete Warmer
> 
> Removing a warmer can be done against an index (or alias / indices) based on its name. The provided name can be a simple wildcard expression or omitted to remove all warmers. Some samples:
> 
> \`\`\`
> \# delete warmer named warmer\_1 on test index
> curl -XDELETE localhost:9200/test/\_warmer/warmer\_1 
> 
> \# delete all warmers that start with warm on test index
> curl -XDELETE localhost:9200/test/\_warmer/warm\* 
> 
> \# delete all warmers for test index
> curl -XDELETE localhost:9200/test/\_warmer/
> \`\`\`
> \## GETting Warmer
> 
> Getting a warmer for specific index (or alias, or several indices) based on its name. The provided name can be a simple wildcard expression or omitted to get all warmers. Some examples: 
> 
> \`\`\`
> \# get warmer named warmer\_1 on test index
> curl -XGET localhost:9200/test/\_warmer/warmer\_1 
> 
> \# get all warmers that start with warm on test index
> curl -XGET localhost:9200/test/\_warmer/warm\* 
> 
> \# get all warmers for test index
> curl -XGET localhost:9200/test/\_warmer/
> \`\`\`

clint

---

<div class="post-metadata">

**Author:** ![ywtsang](https://avatars.discourse-cdn.com/v4/letter/y/a698b9/32.png) [@ywtsang](https://discuss.elastic.co/u/ywtsang)\
**Post date:** [June 22, 2012, 8:58am UTC](https://discuss.elastic.co/t/immediate-index-warmup-after-documents-are-reindexed/8190/3 "2012-06-22T08:58:08Z")

</div>

Then, do we have schedule for the launch of 0.20?

Thanks,  
Wing

On Fri, Jun 22, 2012 at 3:33 PM, Clinton Gormley [clint@traveljury.com](mailto:clint@traveljury.com) wrote:

> > So how we can effectively warmup the indexes so that queries will not  
> > get this 1 to 3 seconds slowness?
> 
> Due out in 0.20: warmup API  
> [Index Warmup API · Issue #1913 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1913)
> 
> clint

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [June 25, 2012, 1:08pm UTC](https://discuss.elastic.co/t/immediate-index-warmup-after-documents-are-reindexed/8190/4 "2012-06-25T13:08:02Z")

</div>

There isn't a fixed data for 0.20 release yet. Though several companies use  
it in production.

On Fri, Jun 22, 2012 at 10:58 AM, Yiu Wing TSANG [ywtsang@gmail.com](mailto:ywtsang@gmail.com) wrote:

> Then, do we have schedule for the launch of 0.20?
> 
> Thanks,  
> Wing
> 
> On Fri, Jun 22, 2012 at 3:33 PM, Clinton Gormley [clint@traveljury.com](mailto:clint@traveljury.com)  
> wrote:
> 
> > > So how we can effectively warmup the indexes so that queries will not  
> > > get this 1 to 3 seconds slowness?
> > 
> > Due out in 0.20: warmup API  
> > [Index Warmup API · Issue #1913 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1913)
> > 
> > clint

---

<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, 3:22am UTC](https://discuss.elastic.co/t/immediate-index-warmup-after-documents-are-reindexed/8190/5 "2017-07-06T03:22:41Z")

</div>


