# How to make old data effect when change mapping filed?

**URL:** <https://discuss.elastic.co/t/how-to-make-old-data-effect-when-change-mapping-filed/133460>\
**Category:** Elasticsearch\
**Created:** [May 28, 2018, 5:57am UTC](https://discuss.elastic.co/t/how-to-make-old-data-effect-when-change-mapping-filed/133460 "2018-05-28T05:57:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xuanyetouci](https://avatars.discourse-cdn.com/v4/letter/x/958977/32.png) [@xuanyetouci](https://discuss.elastic.co/u/xuanyetouci)\
**Post date:** [May 28, 2018, 5:57am UTC](https://discuss.elastic.co/t/how-to-make-old-data-effect-when-change-mapping-filed/133460/1 "2018-05-28T05:57:17Z")

</div>

suppose old mapping like this:

```auto
    "resources": {
      "type": "object",
      "enabled": false
    }

```

then es has some data  
if I change mapping like this:

```auto
"resources": {
  "type": "object",
  "properties": {
    "stone": {
      "type": integer,
      "index": true
    },
    "food": {
      "type": integer,
      "index": true
    }
  }
}

```

how to do to make old data has effect ?

---

<div class="post-metadata">

**Author:** ![xuanyetouci](https://avatars.discourse-cdn.com/v4/letter/x/958977/32.png) [@xuanyetouci](https://discuss.elastic.co/u/xuanyetouci)\
**Post date:** [May 28, 2018, 10:24am UTC](https://discuss.elastic.co/t/how-to-make-old-data-effect-when-change-mapping-filed/133460/2 "2018-05-28T10:24:22Z")

</div>

I find this  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html#\_updating\_existing\_field\_mappings](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html#_updating_existing_field_mappings)  
and  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html)  
will help

---

<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:** [June 25, 2018, 10:24am UTC](https://discuss.elastic.co/t/how-to-make-old-data-effect-when-change-mapping-filed/133460/3 "2018-06-25T10:24:22Z")

</div>

Closed on June 25, 2018, 10:24am UTC

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