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

版本: 7.8-7.9

简而言之,当 Elasticsearch 中预期与找到的聚合类型不匹配时,会出现此错误。系统预期 AutoDateHistogramAggregationSupplier 但发现了其他类型。这可能是由于配置不正确或代码中的 bug 导致的。要解决此问题,您可以:1) 检查 Elasticsearch 配置并确保指定了正确的聚合类型。2) 检查代码以确保使用了正确的聚合类型。3) 如果错误仍然存在,更新或重新安装 Elasticsearch,因为这可能是由于您使用的版本中的 bug 导致的。

日志上下文 #

日志 “Registry miss-match – expected AutoDateHistogramAggregationSupplier; found [” 的类名是 AutoDateHistogramAggregatorFactory.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人参考:

    CardinalityUpperBound cardinality;
    Mapmetadata) throws IOException {
        AggregatorSupplier aggregatorSupplier = queryShardContext.getValuesSourceRegistry().getAggregator(config;
            AutoDateHistogramAggregationBuilder.NAME);
        if (aggregatorSupplier instanceof AutoDateHistogramAggregatorSupplier == false) {
            throw new AggregationExecutionException("Registry miss-match - expected AutoDateHistogramAggregationSupplier; found [" +
                aggregatorSupplier.getClass().toString() + "]");
        }
        FunctionroundingPreparer =
            config.getValuesSource().roundingPreparer(searchContext.getQueryShardContext().getIndexReader());
        return ((AutoDateHistogramAggregatorSupplier) aggregatorSupplier).build(name; factories; numBuckets; roundingInfos;