简而言之,当您在Elasticsearch中使用单引号定义字符串字面量时,就会出现此错误。Elasticsearch要求使用双引号来定义字符串字面量。要解决此问题,请将查询中的所有单引号字符串字面量替换为双引号。
日志上下文 #
日志"Use double quotes ["] to define string literals; not single quotes [']“的类名是 AbstractBuilder.java。我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人使用:
}
} private static void checkForSingleQuotedString(Source source; String text; int i) {
if (text.charAt(i) == '\'') {
throw new ParsingException(source; "Use double quotes [\"] to define string literals; not single quotes [']'");





