Elastisearch_cluster常用api
2018-05-02 本文已影响2人
菜花_Q
集群中分片数据已不存在的处理方法:
1)恢复存有N分片的源节点,
2)使用reroute API强制分配分片(官网地址:Cluster Reroute | Elasticsearch Reference [5.5] | Elastic )
post /_cluster/reroute
{
"commands" : [
{
"allocate_empty_primary" :
{ "index" :"yw_nginxaccess-2018_04_27", "shard" : 33, "node":"node-75-144", "accept_data_loss": "true" }
}]
}