# Template is missing

**URL:** <https://discuss.elastic.co/t/template-is-missing/21692>\
**Category:** Elasticsearch\
**Created:** [January 16, 2015, 4:34pm UTC](https://discuss.elastic.co/t/template-is-missing/21692 "2015-01-16T16:34:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gabriele\_Angeli\_2](https://avatars.discourse-cdn.com/v4/letter/g/8797f3/32.png) [@Gabriele\_Angeli\_2](https://discuss.elastic.co/u/Gabriele_Angeli_2)\
**Post date:** [January 16, 2015, 4:34pm UTC](https://discuss.elastic.co/t/template-is-missing/21692/1 "2015-01-16T16:34:52Z")

</div>

i guys, I try to put a new template in ES 1.3.6 but i always obtain the  
same result: {"error":"ActionRequestValidationException[Validation Failed:  
1: template is missing;]","status":500}  
Someone know something about this error? Thanks in advance

--  
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/bf3dee93-c142-4c55-90fb-afd727f8af98%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/bf3dee93-c142-4c55-90fb-afd727f8af98%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 16, 2015, 11:21pm UTC](https://discuss.elastic.co/t/template-is-missing/21692/2 "2015-01-16T23:21:53Z")

</div>

Can you put your complete call into a gist or similar for us to check?

On 17 January 2015 at 05:34, Gabriele Angeli [g.angeli000@gmail.com](mailto:g.angeli000@gmail.com) wrote:

> i guys, I try to put a new template in ES 1.3.6 but i always obtain the  
> same result: {"error":"ActionRequestValidationException[Validation Failed:  
> 1: template is missing;]","status":500}  
> Someone know something about this error? Thanks in advance
> 
> --  
> 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/bf3dee93-c142-4c55-90fb-afd727f8af98%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/bf3dee93-c142-4c55-90fb-afd727f8af98%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/bf3dee93-c142-4c55-90fb-afd727f8af98%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/bf3dee93-c142-4c55-90fb-afd727f8af98%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAEYi1X\_gNWSq-1XvySwKEDTrjfTkBXw%2BzCqNLtvG8BWQHSQfmw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X_gNWSq-1XvySwKEDTrjfTkBXw%2BzCqNLtvG8BWQHSQfmw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Gabriele\_Angeli\_2](https://avatars.discourse-cdn.com/v4/letter/g/8797f3/32.png) [@Gabriele\_Angeli\_2](https://discuss.elastic.co/u/Gabriele_Angeli_2)\
**Post date:** [January 17, 2015, 8:46pm UTC](https://discuss.elastic.co/t/template-is-missing/21692/3 "2015-01-17T20:46:07Z")

</div>

This is my complete query to put a template:

curl -XPUT localhost:9200/\_template/mouse -d'  
{  
"mouse": {  
"template": "_",  
"settings": {  
"index.index.refresh\_interval": "10s",  
"index.routing.allocation.total\_shards\_per\_node": 2  
},  
"mappings": {  
"default": {  
"\_source": {  
"compress": true  
},  
"dynamic\_templates": [  
{  
"string\_template": {  
"mapping": {  
"index": "not\_analyzed",  
"type": "string"  
},  
"match": "_",  
"match\_mapping\_type": "string"  
}  
}  
],  
"properties": {  
"message": {  
"index": "analyzed",  
"type": "string"  
},  
"@timestamp": {  
"format": "dateOptionalTime",  
"type": "date"  
}  
},  
"\_all": {  
"enabled": true  
}  
}  
},  
"aliases": {}  
}  
}'

Il giorno sabato 17 gennaio 2015 00:22:21 UTC+1, Mark Walkom ha scritto:

> Can you put your complete call into a gist or similar for us to check?
> 
> On 17 January 2015 at 05:34, Gabriele Angeli \<[g.ang...@gmail.com](mailto:g.ang...@gmail.com)  
> \<javascript:\>\> wrote:
> 
> > i guys, I try to put a new template in ES 1.3.6 but i always obtain the  
> > same result: {"error":"ActionRequestValidationException[Validation Failed:  
> > 1: template is missing;]","status":500}  
> > Someone know something about this error? Thanks in advance
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/bf3dee93-c142-4c55-90fb-afd727f8af98%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/bf3dee93-c142-4c55-90fb-afd727f8af98%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/bf3dee93-c142-4c55-90fb-afd727f8af98%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/bf3dee93-c142-4c55-90fb-afd727f8af98%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/d3fb0b49-e292-4e72-a4e9-eade6d4a6673%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d3fb0b49-e292-4e72-a4e9-eade6d4a6673%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dgrierso](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dgrierso/32/22486_2.png) [@dgrierso](https://discuss.elastic.co/u/dgrierso)\
**Post date:** [March 9, 2016, 3:07pm UTC](https://discuss.elastic.co/t/template-is-missing/21692/4 "2016-03-09T15:07:01Z")

</div>

I was burnt by this one as well ... you need to remove the { "mouse" : } section surrounding your template definition.

So it should look something like:

`curl -XPUT localhost:9200/_template/mouse -d' { "template": "*", "settings": { "index.index.refresh_interval": "10s", "index.routing.allocation.total_shards_per_node": 2 }, "mappings": { ... etc. ... } }`

---

<div class="post-metadata">

**Author:** ![chromechris](https://avatars.discourse-cdn.com/v4/letter/c/e47c2d/32.png) [@chromechris](https://discuss.elastic.co/u/chromechris)\
**Post date:** [September 28, 2016, 6:00pm UTC](https://discuss.elastic.co/t/template-is-missing/21692/5 "2016-09-28T18:00:29Z")

</div>

Thanks so much guys! I had the same issue Cx

---

<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 5, 2017, 10:16pm UTC](https://discuss.elastic.co/t/template-is-missing/21692/6 "2017-07-05T22:16:31Z")

</div>


