# Elasticsearch reindexing with new mapping and new fields

**URL:** <https://discuss.elastic.co/t/elasticsearch-reindexing-with-new-mapping-and-new-fields/31748>\
**Category:** Elasticsearch\
**Created:** [October 7, 2015, 6:52am UTC](https://discuss.elastic.co/t/elasticsearch-reindexing-with-new-mapping-and-new-fields/31748 "2015-10-07T06:52:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhmtnlr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mhmtnlr/32/45665_2.png) [@mhmtnlr](https://discuss.elastic.co/u/mhmtnlr)\
**Post date:** [October 7, 2015, 6:52am UTC](https://discuss.elastic.co/t/elasticsearch-reindexing-with-new-mapping-and-new-fields/31748/1 "2015-10-07T06:52:42Z")

</div>

Hi guys,  
I am using elasticsearch 1.3.4 and I need to reindex my data with new mapping and new field

my current mapping like this:

```
{
  "book_v1": {
    "mappings": {
      "en": {
        "dynamic": "true",
        "numeric_detection": true,
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "analyzer": "name_analyzer",
            "norms": {
              "enabled": false
            },
            "type": "string"
          }
        }
      }
    }
  }
}

```

and i want to create new mapping and reindex my data.

```
{
  "book_v2": {
    "mappings": {
      "en": {
        "dynamic": "true",
        "numeric_detection": true,
        "properties": {
          "id": {
            "type": "string"
          },
          "name.ngram": {
            "analyzer": "ngram_analyzer",
            "norms": {
              "enabled": false
            },
            "type": "string"
          },
          "name.edgeGram": {
            "analyzer": "edgegram_analyzer",
            "norms": {
              "enabled": false
            },
            "type": "string"
          }
        }
      }
    }
  }
}

```

I'm looking for something like this. I look elasticsearch reindexing and it doesn't do what i want or i misuse it.  
Because i create book\_v2 and try to reindex data from book\_v1 and it didn't work as i expected. i override my book\_v2. and create duplicate of book\_v1.  
So, any idea how can do this?  
(p.s: plugins not preferred. )

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 8, 2015, 3:00am UTC](https://discuss.elastic.co/t/elasticsearch-reindexing-with-new-mapping-and-new-fields/31748/2 "2015-10-08T03:00:51Z")

</div>

Easiest way is to create a new index with the new mapping and then reindex the data into it.  
Aliases can help here

---

<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 5, 2017, 11:46pm UTC](https://discuss.elastic.co/t/elasticsearch-reindexing-with-new-mapping-and-new-fields/31748/3 "2017-07-05T23:46:00Z")

</div>


