How to compute for the fields of matching documents in Elasticsearch?

Here is my sample document:

{
"jobID": "ace4c888-1907-4021-a808-4a816e99aa2e",
"startTime": 1415255164835,
"endTime": 1415255164898,
"moduleCode": "STARTING_MODULE"
}

  • I have thousands of documents.
  • I have a pair of documents with the same jobID and the module code
    would be STARTING_MODULE and ENDING_MODULE.
  • My formula would be ENDING_MODULE endTime minus STARTING_MODULE
    startTime equals the elapsed time it took the module to process.

My question is: How do I get the total of all results with the elapsed
time that is less than let's say 28800000?

Is such results possible with Elasticsearch? I'd like to display my results
in Kibana too.

Please let me know if this needs more clarification. Thanks!

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ca558162-d0f3-4857-860c-a0d36e43eee9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.