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

版本: 7.4-7.1

简而言之,当Elasticsearch遇到它不支持或无法识别的聚合类型时,就会出现此错误。这可能是由于聚合类型名称拼写错误,使用了过时或已弃用的聚合类型,或使用了当前Elasticsearch版本中不可用的聚合类型造成的。要解决此问题,您应该验证聚合类型名称,查看Elasticsearch文档以了解正确的用法,或者如果聚合类型仅在较新版本中可用,则更新Elasticsearch版本。

日志上下文 #

日志"Unsupported aggregation type [" + agg.getType() + “]“的类名是 Pivot.java。我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人使用:

public void validateConfig(ActionListenerlistener) {
 for (AggregationBuilder agg : config.getAggregationConfig().getAggregatorFactories()) {
 if (TransformAggregations.isSupportedByTransform(agg.getType()) == false) {
 // todo: change to ValidationException
 listener.onFailure(
 new ElasticsearchStatusException("Unsupported aggregation type [" + agg.getType() + "]"; RestStatus.BAD_REQUEST)
 );
 return;
 }
 }
 listener.onResponse(true);