# Problem with average response time

**URL:** https://discuss.elastic.co/t/problem-with-average-response-time/202839
**Category:** Elasticsearch
**Created:** [October 9, 2019, 1:41pm UTC](https://discuss.elastic.co/t/problem-with-average-response-time/202839 "2019-10-09T13:41:51Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![AKSHAY\_R](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/akshay_r/32/45742_2.png) [@AKSHAY\_R](https://discuss.elastic.co/u/AKSHAY_R)
#### Post date: [October 9, 2019, 1:41pm UTC](https://discuss.elastic.co/t/problem-with-average-response-time/202839/1 "2019-10-09T13:41:51Z")

</div>

We are trying to execute below query but unable to get the average of a specific field , but if we use only the "app\_id" we get the average response time , and if we use "app\_id" and "contaner\_url" we get the result but the average response time is always null, kindly help.

GET /\_search  
{  
"from": 0,  
"size": 10,  
"aggs": {  
"avg\_response\_time": {  
"avg": {  
"field": "timer\_page\_load"  
}  
}  
},  
"query": {  
"bool": {  
"must":[  
{  
"term": {  
"app\_id": "40DNASLD"  
}  
},  
{  
"term": {  
"container\_url.keyword" : "[https://xyz.abc.com/smartit/app/#/ticket-console](https://xyz.abc.com/smartit/app/#/ticket-console)"  
}  
}  
],  
"filter": {  
"range": {  
"timestamp": {  
"gte": "now-15m",  
"lt": "now"  
}  
}  
}  
}  
},  
"sort": [  
{  
"timestamp": {  
"order": "desc"  
}  
}  
]  
}

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [October 11, 2019, 12:41pm UTC](https://discuss.elastic.co/t/problem-with-average-response-time/202839/2 "2019-10-11T12:41:38Z")

</div>

if you execute that query without aggs and without filtering for `app_id`, just using the `container_url.keyword` filter. Do you get any results?

--Alex

---

<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: [November 8, 2019, 12:41pm UTC](https://discuss.elastic.co/t/problem-with-average-response-time/202839/3 "2019-11-08T12:41:43Z")

</div>

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