# Using painless to calculate durations

**URL:** https://discuss.elastic.co/t/using-painless-to-calculate-durations/119495
**Category:** Elasticsearch
**Created:** [February 12, 2018, 3:16pm UTC](https://discuss.elastic.co/t/using-painless-to-calculate-durations/119495 "2018-02-12T15:16:41Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)
#### Post date: [February 12, 2018, 3:46pm UTC](https://discuss.elastic.co/t/using-painless-to-calculate-durations/119495/2 "2018-02-12T15:46:36Z")

</div>

This question looks like another case of "joining related records based on a high cardinality ID"

See [How to search relationship between log lines](https://discuss.elastic.co/t/how-to-search-relationship-between-log-lines/119078)

---

_[View the full topic](https://discuss.elastic.co/t/using-painless-to-calculate-durations/119495)._
