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

版本: 7.6-8.5

简而言之,当Elasticsearch由于请求中的includes/excludes参数不正确或无效而无法检索具有特定ID的文档时,就会发生此错误。这可能是由于拼写错误、字段名不正确或字段不存在造成的。要解决此问题,您可以验证includes/excludes参数中的字段名称,确保字段存在于文档中,并检查请求中是否存在拼写错误。此外,请确保具有指定ID的文档存在于您的Elasticsearch索引中。

日志上下文 #

日志 “Failed to get id [” + id + “] with includes/excludes set” 的类名是 ShardGetService.java. 我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人参考:

} else if (fetchSourceContext.includes().length > 0 || fetchSourceContext.excludes().length > 0) {
    try {
        source = XContentFieldFilter.newFieldFilter(fetchSourceContext.includes(); fetchSourceContext.excludes())
            .apply(source; null);
    } catch (IOException e) {
        throw new ElasticsearchException("Failed to get id [" + id + "] with includes/excludes set"; e);
    }
    }
    }  return new GetResult(