# Templates are not updated

**URL:** https://discuss.elastic.co/t/templates-are-not-updated/17928
**Category:** Elasticsearch
**Created:** [June 5, 2014, 12:45pm UTC](https://discuss.elastic.co/t/templates-are-not-updated/17928 "2014-06-05T12:45:43Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Bernhard\_Berger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bernhard_berger/32/833_2.png) [@Bernhard\_Berger](https://discuss.elastic.co/u/Bernhard_Berger)
#### Post date: [June 5, 2014, 12:45pm UTC](https://discuss.elastic.co/t/templates-are-not-updated/17928/1 "2014-06-05T12:45:43Z")

</div>

The templates from "localhost:9200/\_template" get not updated with the  
configured one, even when I create an index.  
I am not sure, is this is a bug?

Steps to reproduce:

1. Create in a fresh Elasticsearch 1.2.1 installation the file  
"config/templates/template\_1.json" like in this example  
[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-templates.html#config](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-templates.html#config)

2. Start Elasticsearch

3. Create an index:  
curl localhost:9200/test

4. Check that the mapping is used from our template\_1:  
curl localhost:9200/\_mapping/

5. ...but the templates are not updated:  
curl localhost:9200/\_template/  
-\> Empty result - is this a bug?

In my app I just want to check if the user has installed Elasticsearch  
with the correct templates. - But localhost:9200/\_template/ seems only  
to work after documents has already been indexed when using the config  
directory for templates.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/53906677.8030303%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/53906677.8030303%40gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Antonio\_Augusto\_Sant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/antonio_augusto_sant/32/82851_2.png) [@Antonio\_Augusto\_Sant](https://discuss.elastic.co/u/Antonio_Augusto_Sant)
#### Post date: [June 5, 2014, 1:05pm UTC](https://discuss.elastic.co/t/templates-are-not-updated/17928/2 "2014-06-05T13:05:25Z")

</div>

AFAIK the templates that lives on the filesystem are not put on "\_template".  
Also, you can update the template on the FS without restarting ES and it  
will get the new info there.

On Thursday, June 5, 2014 9:45:53 AM UTC-3, Bernhard Berger wrote:

> The templates from "localhost:9200/\_template" get not updated with the  
> configured one, even when I create an index.  
> I am not sure, is this is a bug?
> 
> Steps to reproduce:
> 
> 1. Create in a fresh Elasticsearch 1.2.1 installation the file  
> "config/templates/template\_1.json" like in this example
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-templates.html#config)
> 
> 1. Start Elasticsearch
> 
> 2. Create an index:  
> curl localhost:9200/test
> 
> 3. Check that the mapping is used from our template\_1:  
> curl localhost:9200/\_mapping/
> 
> 4. ...but the templates are not updated:  
> curl localhost:9200/\_template/  
> -\> Empty result - is this a bug?
> 
> In my app I just want to check if the user has installed Elasticsearch  
> with the correct templates. - But localhost:9200/\_template/ seems only  
> to work after documents has already been indexed when using the config  
> directory for templates.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/77a13bb8-5e96-430f-99ab-845df94ff255%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/77a13bb8-5e96-430f-99ab-845df94ff255%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Bernhard\_Berger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bernhard_berger/32/833_2.png) [@Bernhard\_Berger](https://discuss.elastic.co/u/Bernhard_Berger)
#### Post date: [June 5, 2014, 1:39pm UTC](https://discuss.elastic.co/t/templates-are-not-updated/17928/3 "2014-06-05T13:39:08Z")

</div>

Thanks, that was an unexpected behaviour for me. I will avoid filesystem  
templates in the future and directly PUT templates in my application to  
Elasticsearch.

Am 05.06.2014 15:05, schrieb Antonio Augusto Santos:

> AFAIK the templates that lives on the filesystem are not put on  
> "\_template".  
> Also, you can update the template on the FS without restarting ES and  
> it will get the new info there.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/539072FC.4040303%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/539072FC.4040303%40gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:24am UTC](https://discuss.elastic.co/t/templates-are-not-updated/17928/4 "2017-07-06T01:24:28Z")

</div>


