I have a chain of Bucketing Aggregations. Inside I want to apply a Filter Aggregation having the must bool condition defined by a script.
The filter condition should depend on the value of one bucket key from the chain.
Is it possible to define a script parameter that holds the key of a parent aggregation?