Invalid pipeline aggregation named – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-7.7

Briefly, this error occurs when an invalid pipeline aggregation is used in an Elasticsearch query. Pipeline aggregations are used to aggregate the output of other aggregations. The error indicates that the specified pipeline aggregation is not recognized by Elasticsearch. To resolve this issue, ensure that the pipeline aggregation used is valid and correctly spelled. Also, check that the Elasticsearch version you’re using supports the pipeline aggregation you’re trying to use. If not, you may need to upgrade your Elasticsearch version.

This guide will help you check for common problems that cause the log ” Invalid pipeline aggregation named [ ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: search, aggregations.

Log Context

Log “Invalid pipeline aggregation named [” class name is We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 List siblingPipelineAggregators = new ArrayList<>(pipelineAggregators.size());
 for (PipelineAggregator pipelineAggregator : pipelineAggregators) {
 if (pipelineAggregator instanceof SiblingPipelineAggregator) {
 siblingPipelineAggregators.add((SiblingPipelineAggregator) pipelineAggregator);
 } else {
 throw new AggregationExecutionException("Invalid pipeline aggregation named [" +
 + "] of type [" + pipelineAggregator.getWriteableName() + "]. Only sibling pipeline aggregations are "
 + "allowed at the top level");
 context.queryResult().aggregations(new InternalAggregations(aggregations; siblingPipelineAggregators));