New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scriptable Metric Aggregation #5923
Comments
@mattweber The one thing we have right now in the aggs framework is that each agg is agnostic of other aggs and we'd like to keep it this way. We do have plans to come out with a scriptable metrics agg that will enable you to compute the profit (look at it as a scriptable map/reduce logic)... we'll create a public issue for it soon... I'll keep this one open and once we have the public issue for it will link the two |
That sounds great, thanks for the update! |
@uboness Just pinging to see if there has been any progress toward functionality that would allow this type of aggregation? |
A metrics aggregation which runs specified scripts at the init, collect, combine, and reduce phases Closes #5923
A metrics aggregation which runs specified scripts at the init, collect, combine, and reduce phases Closes #5923
It would be great if we could have a script-based metric aggregation that can
refer to other metric aggregations from within the script. For example, given
the data and query given in this gist:
https://gist.github.com/mattweber/71033b1bf2ebed1afd8e
It would like to be able to do something like the following for a "profit" calculation:
So using the data from the gist we would get a response such as:
I believe something like this would be possible given the fact that the
the
order
parameter of a Terms Aggregation can refer to metric sub-aggregationvalues. The logic and retrieving the values should be very similar. Exposing
them to a script might be the hard part.
I will look into this further but I wanted to open the issue in case you are
working on similar functionality or have any suggestions for me.
/cc @uboness @jpountz
The text was updated successfully, but these errors were encountered: