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

版本: 6.8-7.15

简而言之,当 Elasticsearch 在查询或配置中期望出现逗号或加号但未找到时,就会发生此错误。这可能是由于语法错误或格式不正确造成的。要解决此问题,你应该检查你的查询或配置文件,确保其格式正确。确保所有必要的逗号和加号都包含在内,并且位置正确。此外,确保没有多余或缺失的括号或圆括号。如果错误仍然存在,考虑简化你的查询或配置以隔离问题。

日志上下文 #

日志 “expected ” + COMMA + “ or ” 的类名是 GeoWKTParser.java。我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入了解上下文的人参考:

private static String nextCloserOrComma(StreamTokenizer stream) throws IOException, ElasticsearchParseException {
    String token = nextWord(stream);
    if (token.equals(COMMA) || token.equals(RPAREN)) {
        return token;
    }
    throw new ElasticsearchParseException("expected " + COMMA + " or " + RPAREN
        + " but found: " + tokenString(stream), stream.lineno());
}

/** next word in the stream */
private static void checkEOF(StreamTokenizer stream) throws ElasticsearchParseException, IOException {