# How to search by response time

**URL:** <https://discuss.elastic.co/t/how-to-search-by-response-time/15735>\
**Category:** Elasticsearch\
**Created:** [February 11, 2014, 5:28pm UTC](https://discuss.elastic.co/t/how-to-search-by-response-time/15735 "2014-02-11T17:28:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lekkie](https://avatars.discourse-cdn.com/v4/letter/l/46a35a/32.png) [@lekkie](https://discuss.elastic.co/u/lekkie)\
**Post date:** [February 11, 2014, 5:28pm UTC](https://discuss.elastic.co/t/how-to-search-by-response-time/15735/1 "2014-02-11T17:28:05Z")

</div>

Hi,

I will like to search an index that has fields that contain a requestTime and responseTime field. The search will typically find the difference in time (responseTime - requestTime) in each document, order and group the result by another field.

Is this possible? What is the right query to do this?

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:50am UTC](https://discuss.elastic.co/t/how-to-search-by-response-time/15735/2 "2017-07-06T01:50:58Z")

</div>


