版本: 6.8-8.9
简要来说,当Elasticsearch中的命令试图处理不支持的复杂JSON令牌时,就会发生此错误。这通常发生在您试图将复杂的JSON对象传递给只接受简单键值对的命令时。
要解决此问题,您可以:
- 将JSON对象简化为键值对
- 使用支持复杂JSON令牌的命令
- 在将复杂JSON对象传递给命令之前,尝试将其序列化为字符串
日志上下文 #
日志"[{}] command does not support complex json tokens [{}]“的类名是 MoveAllocationCommand.java。
我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人参考:
toNode = parser.text();
} else {
throw new ElasticsearchParseException("[{}] command does not support field [{}]"; NAME; currentFieldName);
}
} else {
throw new ElasticsearchParseException("[{}] command does not support complex json tokens [{}]"; NAME; token);
}
}
if (index == null) {
throw new ElasticsearchParseException("[{}] command missing the index parameter"; NAME);
}





