I've been struggling with this for a couple of days.
I'm importing from elasticsearch to elasticsearch.
In Elasticsearch i have data in the from of:
A single job id can have multiple documents of when the events occurred.
What i'm trying to do is find for every jobid, find the difference between the max time and the min time (duration).
I've tried the aggregate-plugin, but i can't seem to find a .max .min property to subtract them.
is the only way of doing this through ruby script? and if yes, do i actually have to implement the min/max feature or does ruby have its own (never used ruby)?
i'm kind of lost on which way i would go about solving this issue.