当前位置:网站首页>Points to be considered when deleting mapping field of index in ES

Points to be considered when deleting mapping field of index in ES

2020-11-06 21:45:28 Architects who can drive

  1. Create a new index
  2. New index create new mapping
  3. The source leads the data to the new index
  4. The new index creates the same alias as the original index
  5. Delete the original index

For step four : This will use the index alias , If you didn't consider designing index aliases when you first started building indexes , That's the cup .
You can set the name of the index to name_v1   Alias set to name, Then when accessing the search code, the connection is actually an alias name;
In this way, when you need to re create the index structure after adjustment , You can create a new index name_v2, And then after the data initialization is complete , Remove the alias from the original index , hold name_v2 The alias of is set to name, So the code doesn't have to be changed .

版权声明
本文为[Architects who can drive]所创,转载请带上原文链接,感谢