版本: 6.8-8.9
简要来说,当在Elasticsearch查询中多次使用"Explain FORMAT"命令时,会出现此错误。Elasticsearch每个查询只允许使用一次该命令。要解决此问题,你应该检查查询并确保"Explain FORMAT"命令只使用一次。如果它出现多次,请删除多余的实例。此外,确保命令格式正确并放置在查询的正确部分。
日志上下文 #
日志 “Explain FORMAT should be specified at most once” 的类名是 CommandBuilder.java。我们从Elasticsearch源代码中提取了以下内容,以便为寻求深入上下文的人提供参考:
Source source = source(ctx);
if (ctx.PLAN().size() > 1) {
throw new ParsingException(source, "Explain TYPE should be specified at most once");
}
if (ctx.FORMAT().size() > 1) {
throw new ParsingException(source, "Explain FORMAT should be specified at most once");
}
if (ctx.VERIFY().size() > 1) {
throw new ParsingException(source, "Explain VERIFY should be specified at most once");
}





