betto86
betto86

Reputation: 714

Updating ElasticSearch mapping

I have an index with more than 30.000.000 docs. I need to add a new field for new upcoming documents. But I need to specify the correct mapping of this new field.

Will this command leads to any reindexing operation for already existing documents?

PUT /my_index/_mappings/my_type
{
   "my_type": {
      "properties": {
         "A": {
            "properties": {
               "new_field": {
                  "type": "string",
                  "analyzer": "analyzer_keyword"
               }
            }
         }
      }
   }
}

Upvotes: 1

Views: 92

Answers (1)

Richa
Richa

Reputation: 7649

No, above query will not lead to any kind of re-indexing.This will just add a new field in your mapping.New field will get added if you update existing document or create new document. You can refer here for more details.

Upvotes: 1

Related Questions