Pipelines and nested aggs

Hi all,

Anyone know if it is possible to do pipeline aggs when the sibling agg is nested? I always get the following error:

"reason" : "org.elasticsearch.search.aggregations.bucket.nested.InternalNested cannot be cast to org.elasticsearch.search.aggregations.InternalMultiBucketAggregation"

The query and the mapping are quite complex, so I haven't posted them, but will if it helps. I presume it is simply not supported at the moment, but it would be really useful to be able to use pipeline aggs in this way :slight_smile:

I should note - I have posted a second question re copying values from a parent down into it's nested children; that is for a workaround to this issue...

Here is a (much simplified) snippet of the query I have been trying:

		"aggs" : {
			"detail" : {
				"nested": {
					"path": "obs"
				},
				"aggs": {
					"inner_detail" :{
						"filters": {
							"filters" : [ {
								"bool": {
									"should": [
										{
											"term": {
												"obs.hr": "17"
											}
										},
										{
											"term": {
												"obs.hr": "18"
											}
										}
									]
								}
							} ]
						},
						"aggs": {
							"max": {
								"max": {
									"field": "obs.tempc"
								}
							}
						}
					},
					"max": {
						"max_bucket": {
							"buckets_path": "inner_detail>max"
						}
					}
				}
			},
			"max": {
				"max_bucket": {
					"buckets_path": "detail>max"
				}
			}
		}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.