📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入

版本: 6.8-8.9

简而言之,当执行Elasticsearch命令时未指定分片参数会出现此错误。该参数至关重要,它告诉Elasticsearch要在哪个分片上执行操作。要解决此问题,您可以在命令中指定分片参数,或者在Elasticsearch配置中设置默认分片参数。此外,请确保命令语法正确,并且您使用了适合预期操作的命令。

日志上下文 #

日志"[{}] command missing the shard parameter"的类名是 MoveAllocationCommand.java。我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人参考:

}
 if (index == null) {
 throw new ElasticsearchParseException("[{}] command missing the index parameter", NAME);
 }
 if (shardId == -1) {
 throw new ElasticsearchParseException("[{}] command missing the shard parameter", NAME);
 }
 if (fromNode == null) {
 throw new ElasticsearchParseException("[{}] command missing the from_node parameter", NAME);
 }
 if (toNode == null) {