How to make old data effect when change mapping filed?

suppose old mapping like this:

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

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

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

how to do to make old data has effect ?

I find this
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
will help

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