# Creating a template in elastic 5.1 fails , which succeeds in 2.x

**URL:** <https://discuss.elastic.co/t/creating-a-template-in-elastic-5-1-fails-which-succeeds-in-2-x/74723>\
**Category:** Elasticsearch\
**Created:** [February 10, 2017, 10:57pm UTC](https://discuss.elastic.co/t/creating-a-template-in-elastic-5-1-fails-which-succeeds-in-2-x/74723 "2017-02-10T22:57:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![raviscal](https://avatars.discourse-cdn.com/v4/letter/r/dfb087/32.png) [@raviscal](https://discuss.elastic.co/u/raviscal)\
**Post date:** [February 10, 2017, 10:57pm UTC](https://discuss.elastic.co/t/creating-a-template-in-elastic-5-1-fails-which-succeeds-in-2-x/74723/1 "2017-02-10T22:57:53Z")

</div>

Hello,

I am trying to create a template for dynamic indexes. The main reason to create the template is to make sure some of my properties are not indexed. The same works in ES 2.x. Below is my template:

PUT /\_template/cisprodindextemplate  
{  
"template": "logstash-cis-prod-\*",  
"settings": {  
"index": {  
"number\_of\_shards": 1,  
"number\_of\_replicas": 1  
},  
"mappings": {  
"cisprod": {  
"properties": {

```
				"events": {
					"type": "string",
                    "index": "false"					
				}
			
			}
		}
	}

}

```

}

I get the following error:

{  
"error": {  
"root\_cause": [  
{  
"type": "illegal\_argument\_exception",  
"reason": "unknown setting [index.mappings.cisprod.properties.events.index] 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.mappings.cisprod.properties.events.index] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"  
},  
"status": 400  
}

Any help is really appreciated.

Ravi.

---

<div class="post-metadata">

**Author:** ![raviscal](https://avatars.discourse-cdn.com/v4/letter/r/dfb087/32.png) [@raviscal](https://discuss.elastic.co/u/raviscal)\
**Post date:** [February 10, 2017, 11:22pm UTC](https://discuss.elastic.co/t/creating-a-template-in-elastic-5-1-fails-which-succeeds-in-2-x/74723/2 "2017-02-10T23:22:32Z")

</div>

removing "index": has resolved the issue.

---

<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:** [March 10, 2017, 11:22pm UTC](https://discuss.elastic.co/t/creating-a-template-in-elastic-5-1-fails-which-succeeds-in-2-x/74723/3 "2017-03-10T23:22:44Z")

</div>

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