# Failed to parse mapping \[\_doc\]: properties must be a map type

**URL:** <https://discuss.elastic.co/t/failed-to-parse-mapping-doc-properties-must-be-a-map-type/263103>\
**Category:** Elasticsearch\
**Created:** [February 3, 2021, 10:07am UTC](https://discuss.elastic.co/t/failed-to-parse-mapping-doc-properties-must-be-a-map-type/263103 "2021-02-03T10:07:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![coudenysj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/coudenysj/32/23108_2.png) [@coudenysj](https://discuss.elastic.co/u/coudenysj)\
**Post date:** [February 3, 2021, 10:07am UTC](https://discuss.elastic.co/t/failed-to-parse-mapping-doc-properties-must-be-a-map-type/263103/1 "2021-02-03T10:07:19Z")

</div>

I'm trying to update the routing allocation of index templates, but with the new 7.10 release, I get strange errors.

For the other version, I just GET the index template, alter the routing key, and PUT it back to the API. Since 7.10 I get this exception:

```
{
  "error": {
    "root_cause": [
      {
        "type": "parse_exception",
        "reason": "properties must be a map type"
      }
    ],
    "type": "mapper_parsing_exception",
    "reason": "Failed to parse mapping [_doc]: properties must be a map type",
    "caused_by": {
      "type": "parse_exception",
      "reason": "properties must be a map type"
    }
  },
  "status": 400
}

```

Which is strange, because there is no \_doc key anymore, and when I try to add one, I get:

```
{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "The mapping definition cannot be nested under a type [_doc] unless include_type_name is set to true."
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "The mapping definition cannot be nested under a type [_doc] unless include_type_name is set to true."
  },
  "status": 400
}

```

Any ideas on how to fix this?

---

<div class="post-metadata">

**Author:** ![coudenysj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/coudenysj/32/23108_2.png) [@coudenysj](https://discuss.elastic.co/u/coudenysj)\
**Post date:** [February 24, 2021, 12:35pm UTC](https://discuss.elastic.co/t/failed-to-parse-mapping-doc-properties-must-be-a-map-type/263103/2 "2021-02-24T12:35:56Z")

</div>

I can't figure out why this won't work.

In older templates (and in the other beats templates) I can change this.

---

<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 24, 2021, 12:36pm UTC](https://discuss.elastic.co/t/failed-to-parse-mapping-doc-properties-must-be-a-map-type/263103/3 "2021-03-24T12:36:32Z")

</div>

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