Closed
Description
bucket_path
syntax allows for retrieving the current count, number of buckets and lastly the value of the current bucket through _bucket
.
However it doesn't seem to work (as far as I can tell) for composite agg as it cannot unwrap the map of keys used internally by the agg:
Take for example the following query:
"aggregations": {
"groupby": {
"composite": {
"sources": [{
"31": {
"date_histogram": {
"field": "birth_date"
...
}
}
}
]
},
"aggregations": {
"having.8": {
"bucket_selector": {
"buckets_path": {
"g0": "_key"
}
}
}
}
}
}
this returns:
"buckets_path must reference either a number value or a single value numeric metric aggregation, got: org.elasticsearch.search.aggregations.bucket.composite.InternalComposite.ArrayMap"
and any other variation such as "31", "31>_key", "31#_key", "_key[31]", "_key#31" returns "agg not found"