2016-02-29 189 views
1

我有一個包含30,000.000個文檔的索引。 我需要爲即將到來的新文檔添加一個新字段。 但我需要指定這個新字段的正確映射。更新ElasticSearch映射

此命令是否會導致已有文檔的任何重新編排操作?

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

回答

1

沒有,上面的查詢不會導致任何re-indexing。這將只是在你的mapping.New字段中添加一個新的領域將得到補充,如果你update existing documentcreate new document。 有關更多詳細信息,請參閱here