# Elasticsearch mapping template not getting uploaded

**URL:** <https://discuss.elastic.co/t/elasticsearch-mapping-template-not-getting-uploaded/135180>\
**Category:** Elasticsearch\
**Created:** [June 8, 2018, 4:43pm UTC](https://discuss.elastic.co/t/elasticsearch-mapping-template-not-getting-uploaded/135180 "2018-06-08T16:43:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vikrant\_Aggarwal](https://avatars.discourse-cdn.com/v4/letter/v/f14d63/32.png) [@Vikrant\_Aggarwal](https://discuss.elastic.co/u/Vikrant_Aggarwal)\
**Post date:** [June 8, 2018, 4:43pm UTC](https://discuss.elastic.co/t/elasticsearch-mapping-template-not-getting-uploaded/135180/1 "2018-06-08T16:43:17Z")

</div>

Getting the following error while uploading the ES index template.

```auto
$ curl -H 'Content-Type: application/json' -XPUT http://localhost:9200/_template/logs_template?pretty -d @logs_template.json
{
  "error" : {
    "root_cause" : [
      {
        "type" : "mapper_parsing_exception",
        "reason" : "Root mapping definition has unsupported parameters: [app : {type=text, fields={keyword={ignore_above=256, type=keyword}}}] [container : {type=text, fields={keyword={ignore_above=256, type=keyword}}}] [code_file : {type=text, fields={keyword={ignore_above=256, type=keyword}}}] [dst_connect_time : {type=text, fields={keyword={ignore_above=256, type=keyword}}}] [container_name : {type=text, fields={keyword={ignore_above=256, type=keyword}}}] [content_type : {type=text, fields={keyword={ignore_above=256, type=keyword}}}] [app_instance : {type=text, fields={keyword={ignore_above=256, type=keyword}}}] [code_line : {type=long}] [code_func : {type=text, fields={keyword={ignore_above=256, type=keyword}}}] [dst_ip : {type=ip}]"
      }
    ],
    "type" : "mapper_parsing_exception",
    "reason" : "Failed to parse mapping [_default_]: Root mapping definition has unsupported parameters: [app : {type=text, fields={keyword={ignore_above=256, type=keyword}}}] [container : {type=text, fields={keyword={ignore_above=256, type=keyword}}}] [code_file : {type=text, fields={keyword={ignore_above=256, type=keyword}}}] [dst_connect_time : {type=text, fields={keyword={ignore_above=256, type=keyword}}}] [container_name : {type=text, fields={keyword={ignore_above=256, type=keyword}}}] [content_type : {type=text, fields={keyword={ignore_above=256, type=keyword}}}] [app_instance : {type=text, fields={keyword={ignore_above=256, type=keyword}}}] [code_line : {type=long}] [code_func : {type=text, fields={keyword={ignore_above=256, type=keyword}}}] [dst_ip : {type=ip}]",
    "caused_by" : {
      "type" : "mapper_parsing_exception",
      "reason" : "Root mapping definition has unsupported parameters: [app : {type=text, fields={keyword={ignore_above=256, type=keyword}}}] [container : {type=text, fields={keyword={ignore_above=256, type=keyword}}}] [code_file : {type=text, fields={keyword={ignore_above=256, type=keyword}}}] [dst_connect_time : {type=text, fields={keyword={ignore_above=256, type=keyword}}}] [container_name : {type=text, fields={keyword={ignore_above=256, type=keyword}}}] [content_type : {type=text, fields={keyword={ignore_above=256, type=keyword}}}] [app_instance : {type=text, fields={keyword={ignore_above=256, type=keyword}}}] [code_line : {type=long}] [code_func : {type=text, fields={keyword={ignore_above=256, type=keyword}}}] [dst_ip : {type=ip}]"
    }
  },
  "status" : 400
}
}

```

Here is my index template I have verified on jsonlint that it's a valid json not sure what's causing the issue?

No existing index is present

```auto
$ curl http://localhost:9200/_cat/indices?pretty
green open .kibana e5a5icv9RXmA4-PGafo6eA 1 0 2 0 14.3kb 14.3kb

```

ES version is 6.2.4

---

<div class="post-metadata">

**Author:** ![Vikrant\_Aggarwal](https://avatars.discourse-cdn.com/v4/letter/v/f14d63/32.png) [@Vikrant\_Aggarwal](https://discuss.elastic.co/u/Vikrant_Aggarwal)\
**Post date:** [June 8, 2018, 4:46pm UTC](https://discuss.elastic.co/t/elasticsearch-mapping-template-not-getting-uploaded/135180/2 "2018-06-08T16:46:35Z")

</div>

[https://paste.fedoraproject.org/paste/~8acz~tlCH5FCDvZfWNHsQ](https://paste.fedoraproject.org/paste/~8acz~tlCH5FCDvZfWNHsQ)

template.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 8, 2018, 5:00pm UTC](https://discuss.elastic.co/t/elasticsearch-mapping-template-not-getting-uploaded/135180/3 "2018-06-08T17:00:25Z")

</div>

```auto
{
    "mappings": {
        "_default_":å {
            "app": {
                "fields": {
                    "keyword": {
                        "ignore_above": 256,
                        "type": "keyword"
                    }
                },
                "type": "text"
            },

```

Do you see the `å` typo?

---

<div class="post-metadata">

**Author:** ![Vikrant\_Aggarwal](https://avatars.discourse-cdn.com/v4/letter/v/f14d63/32.png) [@Vikrant\_Aggarwal](https://discuss.elastic.co/u/Vikrant_Aggarwal)\
**Post date:** [June 8, 2018, 6:42pm UTC](https://discuss.elastic.co/t/elasticsearch-mapping-template-not-getting-uploaded/135180/4 "2018-06-08T18:42:14Z")

</div>

strangely I don't see in the vim or sublime.

```auto
{
	"template": "logs-*",
	"settings": {
		"index.refresh_interval": "5s"
	},
	"mappings": {
		"_default_": {
			"properties": {
				"@version": {
					"type": "text",
					"fields": {
						"keyword": {
							"type": "keyword",
							"ignore_above": 256

```

---

<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, 2018, 6:42pm UTC](https://discuss.elastic.co/t/elasticsearch-mapping-template-not-getting-uploaded/135180/5 "2018-07-06T18:42:15Z")

</div>

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