ES 进行数据迁移 reindex (加速)

https://www.cnblogs.com/ititit111222333/p/16382943.html

 

修改批量大小值

POST _reindex
{
    "source": {
        "index": "源索引名称",
        "size": 5000
    },
    "dest": {
        "index": "迁移的索引名称",
        "routing": "=cat"
    }
}

ES副本数设置为0

PUT /迁移的索引名称/_settings

{
         "number_of_replicas": 0
}

修改Refresh的间隔时间

PUT /迁移的索引名称/_settings

{
    "refresh_interval": -1
}
 

posted on 2023-12-26 14:51  ExplorerMan  阅读(170)  评论(0编辑  收藏  举报

导航