# ES 6.1 dynamic template with multiple match\_mapping\_type

**URL:** <https://discuss.elastic.co/t/es-6-1-dynamic-template-with-multiple-match-mapping-type/113815>\
**Category:** Elasticsearch\
**Created:** [January 2, 2018, 5:21pm UTC](https://discuss.elastic.co/t/es-6-1-dynamic-template-with-multiple-match-mapping-type/113815 "2018-01-02T17:21:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ld\_pvl](https://avatars.discourse-cdn.com/v4/letter/l/cdc98d/32.png) [@ld\_pvl](https://discuss.elastic.co/u/ld_pvl)\
**Post date:** [January 2, 2018, 5:21pm UTC](https://discuss.elastic.co/t/es-6-1-dynamic-template-with-multiple-match-mapping-type/113815/1 "2018-01-02T17:21:54Z")

</div>

Hi,

In previous versions a template like this worked fine:

```
    "other_fields": {
      "mapping": {
        "norms" : false,
        "type": "{dynamic_type}",
        "index": "true"
      },
      "match_mapping_type": "boolean|date|double|long|object",
      "match" : "*"
    }

```

But not anymore in 6.1 due to the following error:

```
{
  "error" : {
    "root_cause" : [
      {
        "type" : "mapper_parsing_exception",
        "reason" : "Failed to parse mapping [_default_]: No field type matched on [boolean|date|double|long|object], possible values are [object, string, long, double, boolean, date, binary]"
      }
    ],
    "type" : "mapper_parsing_exception",
    "reason" : "Failed to parse mapping [_default_]: No field type matched on [boolean|date|double|long|object], possible values are [object, string, long, double, boolean, date, binary]",
    "caused_by" : {
      "type" : "illegal_argument_exception",
      "reason" : "No field type matched on [boolean|date|double|long|object], possible values are [object, string, long, double, boolean, date, binary]"
    }
  },
  "status" : 400
}

```

Were there any changes related to this? I wasn't able to find much info.

Many thanks,

---

<div class="post-metadata">

**Author:** ![ld\_pvl](https://avatars.discourse-cdn.com/v4/letter/l/cdc98d/32.png) [@ld\_pvl](https://discuss.elastic.co/u/ld_pvl)\
**Post date:** [January 4, 2018, 2:40pm UTC](https://discuss.elastic.co/t/es-6-1-dynamic-template-with-multiple-match-mapping-type/113815/2 "2018-01-04T14:40:10Z")

</div>

According to the [doc](https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic-templates.html):

> Only the following datatypes can be automatically detected: boolean, date, double, long, object, string. It also accepts \* to match all datatypes.

Does it mean from now we can only either match everything or invididual types and not a set of types?

---

<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:** [February 1, 2018, 2:40pm UTC](https://discuss.elastic.co/t/es-6-1-dynamic-template-with-multiple-match-mapping-type/113815/3 "2018-02-01T14:40:25Z")

</div>

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