我执行下面的命令报错:
POST /_cluster/reroute
{
"commands" : [ {
"allocate" : {
"index" : "kid_book_v3",
"shard" : 0,
"node" : "mDHDv4jaRpmD515eIqnJ8g",
"allow_primary" : true
}
}]
}
报错内容:
{
"error": {
"root_cause": [
{
"type": "unknown_named_object_exception",
"reason": "Unknown AllocationCommand [allocate]",
"line": 3,
"col": 18
}
],
"type": "parsing_exception",
"reason": "[cluster_reroute] failed to parse field [commands]",
"line": 3,
"col": 18,
"caused_by": {
"type": "unknown_named_object_exception",
"reason": "Unknown AllocationCommand [allocate]",
"line": 3,
"col": 18
}
},
"status": 400
}
POST /_cluster/reroute
{
"commands" : [ {
"allocate" : {
"index" : "kid_book_v3",
"shard" : 0,
"node" : "mDHDv4jaRpmD515eIqnJ8g",
"allow_primary" : true
}
}]
}
报错内容:
{
"error": {
"root_cause": [
{
"type": "unknown_named_object_exception",
"reason": "Unknown AllocationCommand [allocate]",
"line": 3,
"col": 18
}
],
"type": "parsing_exception",
"reason": "[cluster_reroute] failed to parse field [commands]",
"line": 3,
"col": 18,
"caused_by": {
"type": "unknown_named_object_exception",
"reason": "Unknown AllocationCommand [allocate]",
"line": 3,
"col": 18
}
},
"status": 400
}
2 个回复
zqc0512 - andy zhou
赞同来自:
这个名称好像不是用这个吧。
dllbdxx
赞同来自:
"commands": [
{
"allocate_empty_primary": {
"index": "你的索引名",
"shard": "分片号",
"node": "节点名",
"accept_data_loss":true
}
}
]
}
或者
{
"commands": [{
"allocate_stale_primary": {
"index": "你的索引",
"shard": 0,
"node": "节点名",
"accept_data_loss": true
}
}]
}