# Dynamic Templates MapperParsingException

**URL:** <https://discuss.elastic.co/t/dynamic-templates-mapperparsingexception/29150>\
**Category:** Elasticsearch\
**Created:** [September 11, 2015, 4:08pm UTC](https://discuss.elastic.co/t/dynamic-templates-mapperparsingexception/29150 "2015-09-11T16:08:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Galim\_Kaudinov](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@Galim\_Kaudinov](https://discuss.elastic.co/u/Galim_Kaudinov)\
**Post date:** [September 11, 2015, 4:08pm UTC](https://discuss.elastic.co/t/dynamic-templates-mapperparsingexception/29150/1 "2015-09-11T16:08:51Z")

</div>

I am trying to create a mapping with dynamic template inside, I am doing this through sense plugin. And I am getting this exception

```
{
   "error": "MapperParsingException[Root type mapping not empty after parsing! Remaining fields: [dyanmic_templates : [{textField={match=txt_*, mapping={type=string, index_analyzer=ngram_index, search_analyzer=standard, fields={sort={type=string, index_analyzer=sortable}}}}}]]]",
   "status": 400
}

```

Here is my request:

```
POST cf_index/cftype/_mapping
{
  "cftype" : {
    "dyanmic_templates": [
        {"textField": {
          "match": "txt_*",
          "mapping": {
            "type": "string",
            "index_analyzer": "ngram_index",
            "search_analyzer": "standard",
            "fields": {
               "sort": {
                  "type": "string",
                  "index_analyzer": "sortable"
               }
            }
          }
          
          
        }
          
      }
    ],
    "properties": {
      "name" : { "type": "string" }
    }
  }
}

```

I don't really understand what the exception is telling me here. Any suggestions?

---

<div class="post-metadata">

**Author:** ![Galim\_Kaudinov](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@Galim\_Kaudinov](https://discuss.elastic.co/u/Galim_Kaudinov)\
**Post date:** [September 11, 2015, 4:31pm UTC](https://discuss.elastic.co/t/dynamic-templates-mapperparsingexception/29150/2 "2015-09-11T16:31:16Z")

</div>

I got it. It was the spelling error.

dyanmic\_templates -\> dynamic\_templates

---

<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, 11:50pm UTC](https://discuss.elastic.co/t/dynamic-templates-mapperparsingexception/29150/3 "2017-07-05T23:50:41Z")

</div>


