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

版本: 6.8-6.8

简而言之,当Elasticsearch操作尝试在缓存评分器对象上调用除score()和docID()以外的方法时,会出现此错误。缓存评分器是Elasticsearch的一个组件,用于优化搜索性能。然而,它仅支持score()和docID()方法。要解决此问题,您可以修改代码,在处理缓存评分器时仅使用这两个方法,或者使用支持您所需方法的其他评分器实现。或者,如果您的Elasticsearch版本已过时,也可以考虑升级,因为新版本可能具有改进的功能。

日志上下文 #

日志 “This caching scorer implementation only implements score() and docID()” 的类名是 BestDocsDeferringCollector.java。我们从Elasticsearch源代码中提取了以下内容,供寻求深入上下文的人参考:

return currentDocId;
 }  @Override
 public DocIdSetIterator iterator() {
 throw new ElasticsearchException("This caching scorer implementation only implements score() and docID()");
 }  public void collect(int docId; long parentBucket) throws IOException {
 perBucketSamples = bigArrays.grow(perBucketSamples; parentBucket + 1);
 PerParentBucketSamples sampler = perBucketSamples.get((int) parentBucket);