# Learning ES and Mapper Parsing Exception

**URL:** <https://discuss.elastic.co/t/learning-es-and-mapper-parsing-exception/239044>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [June 29, 2020, 2:28am UTC](https://discuss.elastic.co/t/learning-es-and-mapper-parsing-exception/239044 "2020-06-29T02:28:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gdiaz](https://avatars.discourse-cdn.com/v4/letter/g/74df32/32.png) [@gdiaz](https://discuss.elastic.co/u/gdiaz)\
**Post date:** [June 29, 2020, 2:28am UTC](https://discuss.elastic.co/t/learning-es-and-mapper-parsing-exception/239044/1 "2020-06-29T02:28:45Z")

</div>

Hi to all,

I'm learning ES. I have ES-7.8 in a docker container and started to play around with it. I have created mappings and loaded data already. Now, I'm following a course and I'm trying to create a mapping before loading the data. My `curl` command is as follow...

```auto
    curl -H "Content-Type: application/json" -XPUT localhost:9200/movies -d '
    {
      "mappings": {
        "movie": {
          "properties": {
            "year": {
              "type": "date"
            }
          }
        }
      }
    }'

```

This is the error I'm getting back

```auto
    {
      "error":{
        "root_cause":[
          {
            "type":"mapper_parsing_exception",
            "reason":"Root mapping definition has unsupported parameters: [movie : {properties={year={type=date}}}]"
          }
        ],
        "type":"mapper_parsing_exception",
        "reason":"Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters: [movie : {properties={year={type=date}}}]",
        "caused_by":{
          "type":"mapper_parsing_exception",
          "reason":"Root mapping definition has unsupported parameters: [movie : {properties={year={type=date}}}]"
        }
      },
      "status":400
    }

```

I there a way to troubleshot this or anyone can spot what is wrong in the command?

---

<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 29, 2020, 6:53am UTC](https://discuss.elastic.co/t/learning-es-and-mapper-parsing-exception/239044/2 "2020-06-29T06:53:40Z")

</div>

Try

```
curl -H "Content-Type: application/json" -XPUT localhost:9200/movies -d '
{
  "mappings": {
      "properties": {
        "year": {
          "type": "date"
        }
      }
  }
}'
```

---

<div class="post-metadata">

**Author:** ![gdiaz](https://avatars.discourse-cdn.com/v4/letter/g/74df32/32.png) [@gdiaz](https://discuss.elastic.co/u/gdiaz)\
**Post date:** [June 29, 2020, 11:37am UTC](https://discuss.elastic.co/t/learning-es-and-mapper-parsing-exception/239044/3 "2020-06-29T11:37:54Z")

</div>

That worked. But, How I can modify `properties` per type. Lets say I have two types in the `movies` index, `movie` and `actor`... how can I modify same name property in one type and not in another type?

---

<div class="post-metadata">

**Author:** ![gdiaz](https://avatars.discourse-cdn.com/v4/letter/g/74df32/32.png) [@gdiaz](https://discuss.elastic.co/u/gdiaz)\
**Post date:** [June 29, 2020, 12:10pm UTC](https://discuss.elastic.co/t/learning-es-and-mapper-parsing-exception/239044/4 "2020-06-29T12:10:09Z")

</div>

I think this answers my question...  
[Removal of Types](https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html#removal-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:** [July 27, 2020, 12:24pm UTC](https://discuss.elastic.co/t/learning-es-and-mapper-parsing-exception/239044/5 "2020-07-27T12:24:06Z")

</div>

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