# Unable to create raw field in index template in elk6

**URL:** <https://discuss.elastic.co/t/unable-to-create-raw-field-in-index-template-in-elk6/250703>\
**Category:** Elasticsearch\
**Created:** [October 1, 2020, 3:01pm UTC](https://discuss.elastic.co/t/unable-to-create-raw-field-in-index-template-in-elk6/250703 "2020-10-01T15:01:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajkumar.m](https://avatars.discourse-cdn.com/v4/letter/r/e9bcb4/32.png) [@rajkumar.m](https://discuss.elastic.co/u/rajkumar.m)\
**Post date:** [October 1, 2020, 3:01pm UTC](https://discuss.elastic.co/t/unable-to-create-raw-field-in-index-template-in-elk6/250703/1 "2020-10-01T15:01:59Z")

</div>

`````auto
# vi XXXX.json 
{
    "template" : "XXXXX*",
    "settings" : {
      "index" : {
        "number_of_shards" : "2",
        "number_of_replicas" : "1",
        "refresh_interval" : "5s"
      }
    },
    "mappings": {
      "properties": {
        "city": {
          "type": "text",
          "fields": {
            "raw": {
              "type": "keyword",
              "index": "false"
            }
          }
        }
      }
    }
}

# curl -u XXXXXX:XXXXXX -k -X PUT "https://`hostname`:9200/_template/XXXXX?pretty" -H 'Content-Type: application/json' -d @/XXXX/XXXX.json
{
  "error" : {
    "root_cause" : [
      {
        "type" : "mapper_parsing_exception",
        "reason" : "Root mapping definition has unsupported parameters: [city : {type=text, fields={raw={index=false, type=keyword}}}]"
      }
    ],
    "type" : "mapper_parsing_exception",
    "reason" : "Failed to parse mapping [properties]: Root mapping definition has unsupported parameters: [city : {type=text, fields={raw={index=false, type=keyword}}}]",
    "caused_by" : {
      "type" : "mapper_parsing_exception",
      "reason" : "Root mapping definition has unsupported parameters: [city : {type=text, fields={raw={index=false, type=keyword}}}]"
    }
  },
  "status" : 400
}
````
`````

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [October 2, 2020, 11:16am UTC](https://discuss.elastic.co/t/unable-to-create-raw-field-in-index-template-in-elk6/250703/2 "2020-10-02T11:16:23Z")

</div>

Which Elasticsearch version are you running this against?

---

<div class="post-metadata">

**Author:** ![rajkumar.m](https://avatars.discourse-cdn.com/v4/letter/r/e9bcb4/32.png) [@rajkumar.m](https://discuss.elastic.co/u/rajkumar.m)\
**Post date:** [October 9, 2020, 8:50pm UTC](https://discuss.elastic.co/t/unable-to-create-raw-field-in-index-template-in-elk6/250703/3 "2020-10-09T20:50:31Z")

</div>

Thanks for response, I had a conflict in the existing templates, fixed 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:** [November 6, 2020, 8:51pm UTC](https://discuss.elastic.co/t/unable-to-create-raw-field-in-index-template-in-elk6/250703/4 "2020-11-06T20:51:01Z")

</div>

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