首页 > 其他分享 >es修改mapping

es修改mapping

时间:2022-11-16 11:25:04浏览次数:47  
标签:index 索引 备份 mapping 修改 POST 数据 es

1.备份数据

POST _reindex?wait_for_completion=false&scroll=10m                   
{
  "source": {
    "index": "数据索引",
    "size": 10000
  },
  "dest": {
    "index": "备份索引"
  }
}

2.删除旧的索引

DELETE 数据索引

3.创建新的数据索引mapping

POST /数据索引/item/_mapping
{

  "properties": {
      索引字段属性
  }

}

4.数据还原回来

POST _reindex?wait_for_completion=false&scroll=10m                   
{
  "source": {
    "index": "备份索引",
    "size": 10000
  },
  "dest": {
    "index": "数据索引"
  }
}

  

标签:index,索引,备份,mapping,修改,POST,数据,es
From: https://www.cnblogs.com/navysummer/p/16895238.html

相关文章