How to get `count(*)/sum(Duration)` in elasticsearch(5.1.1) using curl?

I want to use two aggregates at a time my curl command should return the output based on this expression count(*)/sum(Duration) how to do that.

Probably https://www.elastic.co/guide/en/elasticsearch/reference/5.2/search-aggregations-pipeline-bucket-script-aggregation.html

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