ES重建索引

作者: alonwang | 来源:发表于2018-03-14 16:10 被阅读425次

适用于现有索引需要增加一个字段或修改类型

  1. 更新模板
    PUT /_template/xxx
  2. 建立新索引
    PUT /xxx
  3. 重建索引
POST _reindex
{
  "source": {
    "index": "old"
  },
  "dest": {
    "index": "new"
  }}
  1. 转移别名
POST /_aliases
{
    "actions": [
        { "remove": { "index": "old", "alias": "xxx" }},
        { "add":    { "index": "new", "alias": "xxx" }}
    ]}

相关文章

网友评论

    本文标题:ES重建索引

    本文链接:https://www.haomeiwen.com/subject/qamafftx.html