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

版本: 6.8-8.9

简要来说,当Elasticsearch由于内存不足、查询复杂或聚合语法错误等原因无法创建聚合器时,会出现此错误。要解决此问题,您可以增加堆大小以提供更多内存,简化查询以降低复杂度,或检查聚合语法是否存在错误。此外,请确保您的Elasticsearch版本支持您尝试使用的聚合功能。

日志上下文 #

“Failed to create aggregators"日志的类名是 SearchService.java。我们从Elasticsearch源代码中提取了以下内容,以供那些寻求深入了解上下文的用户参考:

context.addQuerySearchResultReleasable(aggContext);
try {
    AggregatorFactories factories = source.aggregations().build(aggContext, null);
    context.aggregations(new SearchContextAggregations(factories));
} catch (IOException e) {
    throw new AggregationInitializationException("Failed to create aggregators", e);
}
}
if (source.suggest() != null) {
    try {
        context.suggest(source.suggest().build(searchExecutionContext));