Is it possible using elasticsearch to compare the results in the columns of the aggregated query. That is, the aggregation values ​​5 and 6.
Using the alert compare condition.
Using the alert compare condition. If possible how to form a query !?

At the moment I see solutions to this issue using the Java API, but for this I have to go through a cycle of all 6 aggregations in order to compile a table of dependencies of all 6 aggregators (like a kibana displays this in the table), is there a way to get values ​​for 6 aggregators at once in the form Array of values.
For example how Terms works. getKeyAsString() ,getDocCount()
The first number receives the key. Its second meaning. And here the first number gets the key a of the values ​​for it 5 in the form of aggregations on the first point

Hi,
I need to compare the values ​​of two columns, that is, compare them with each other, whether they are equal or not. And compare them with certain set values. I thought I'd use alerting for this, so I wrote this thread.