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

版本: 7.13-8.9

简而言之,当Elasticsearch尝试检索具有特定ID的文档,但该文档在索引中不存在时,会发生此错误。这可能是由于文档被删除、尚未建立索引或使用了错误的ID所致。要解决此问题,请确保文档ID正确并且文档存在于索引中。如果文档正在建立索引,请等待索引过程完成。如果文档已被删除,您可能需要重新建立索引。

日志上下文 #

日志 “chunk document with id [” + id + “] not found” 的类名是 DatabaseNodeService.java。我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人参考:

// This makes the code easier to understand and maintain.
SearchResponse searchResponse = client.search(searchRequest).actionGet();
SearchHit[] hits = searchResponse.getHits().getHits();
if (searchResponse.getHits().getHits().length == 0) {
    failureHandler.accept(new ResourceNotFoundException("chunk document with id [" + id + "] not found"));
    return;
}
byte[] data = (byte[]) hits[0].getSourceAsMap().get("data");
md.update(data);
chunkConsumer.accept(data);