# Index template syntax errors for version 5.0

**URL:** <https://discuss.elastic.co/t/index-template-syntax-errors-for-version-5-0/69013>\
**Category:** Elasticsearch\
**Created:** [December 14, 2016, 12:35pm UTC](https://discuss.elastic.co/t/index-template-syntax-errors-for-version-5-0/69013 "2016-12-14T12:35:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hakan\_Klingensjo](https://avatars.discourse-cdn.com/v4/letter/h/43a26b/32.png) [@Hakan\_Klingensjo](https://discuss.elastic.co/u/Hakan_Klingensjo)\
**Post date:** [December 14, 2016, 12:35pm UTC](https://discuss.elastic.co/t/index-template-syntax-errors-for-version-5-0/69013/1 "2016-12-14T12:35:40Z")

</div>

We run an elastic cloud setup. I can not get ES to accept a new index template, which I submit from the built-in Console. The basic error message is that there are syntax errors. But I have been careful to use syntax according to [https://www.elastic.co/guide/en/elasticsearch/reference/5.0/dynamic-templates.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/dynamic-templates.html)

Example ES error message after I put the index template:  
{  
"error": {  
"root\_cause": [  
{  
"type": "illegal\_argument\_exception",  
"reason": "unknown setting [index.hkl-logstash.mappings._default_.dynamic\_templates.0.message\_field.mapping.type] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"  
}  
],  
"type": "illegal\_argument\_exception",  
"reason": "unknown setting [index.hkl-logstash.mappings._default_.dynamic\_templates.0.message\_field.mapping.type] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"  
},  
"status": 400  
}

My index template just use "type": "text" in a dynamic template. This should be supported.

Console input:

PUT /\_template  
{  
"hkl-logstash": {  
"order": 1,  
"template": "logstash-2016.12.14",  
"version": 11,  
"settings": {  
"index": {  
"refresh\_interval": "2s"  
}  
},  
"mappings": {  
"_default_": {  
"dynamic\_templates": [  
{  
"message\_field": {  
"mapping": {  
"type": "text"  
},  
"match\_mapping\_type": "string",  
"match": "message"  
}  
},  
{  
"string\_fields": {  
"mapping": {  
"type": "text",  
"norms": false,  
"fields": {  
"raw": {  
"ignore\_above": 256,  
"index": "not\_analyzed",  
"type": "string"  
}  
}  
},  
"match\_mapping\_type": "string",  
"match": "\*"  
}  
}  
],  
"\_all": {  
},  
"properties": {  
"geoip": {  
"dynamic": true,  
"type": "object",  
"properties": {  
"location": {  
"type": "geo\_point"  
}  
}  
},  
"@version": {  
"type": "keyword"  
}  
}  
}  
},  
"aliases": {}  
}  
}

Anybody has ideas?

Update: My cluster ID is "fcb1bf"

---

<div class="post-metadata">

**Author:** ![erikthered](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@erikthered](https://discuss.elastic.co/u/erikthered)\
**Post date:** [December 14, 2016, 8:24pm UTC](https://discuss.elastic.co/t/index-template-syntax-errors-for-version-5-0/69013/2 "2016-12-14T20:24:29Z")

</div>

This is a question specific to Elasticsearch functionality; I'm going to reassign the category where this has been posted so you'll have a better chance of getting an answer.

Regards,  
Erik

---

<div class="post-metadata">

**Author:** ![Hakan\_Klingensjo](https://avatars.discourse-cdn.com/v4/letter/h/43a26b/32.png) [@Hakan\_Klingensjo](https://discuss.elastic.co/u/Hakan_Klingensjo)\
**Post date:** [December 15, 2016, 9:46am UTC](https://discuss.elastic.co/t/index-template-syntax-errors-for-version-5-0/69013/3 "2016-12-15T09:46:33Z")

</div>

Update:  
I updated our Elastic Cloud to 5.1.1 and that solved the syntax issue. Suddenly templates with "type":"text" can be used, as it is supposed to.  
Keeping this open for a while since there might be other syntax issues in version 5.1.1

---

<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:** [December 18, 2016, 9:46am UTC](https://discuss.elastic.co/t/index-template-syntax-errors-for-version-5-0/69013/4 "2016-12-18T09:46:45Z")

</div>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
