# Can Elasticsearch log how many result found for a slow query?

**URL:** <https://discuss.elastic.co/t/can-elasticsearch-log-how-many-result-found-for-a-slow-query/61408>\
**Category:** Elasticsearch\
**Created:** [September 23, 2016, 6:15pm UTC](https://discuss.elastic.co/t/can-elasticsearch-log-how-many-result-found-for-a-slow-query/61408 "2016-09-23T18:15:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![suanmeiguo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/suanmeiguo/32/11758_2.png) [@suanmeiguo](https://discuss.elastic.co/u/suanmeiguo)\
**Post date:** [September 23, 2016, 6:15pm UTC](https://discuss.elastic.co/t/can-elasticsearch-log-how-many-result-found-for-a-slow-query/61408/1 "2016-09-23T18:15:47Z")

</div>

I'm trying to have a log for the following three things:

1. how long it ran
2. how many result it found
3. what the query is

slow log can give me 1 and 3, but not 2. So is there any way for me to get that?]

Appreciate it!

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [September 24, 2016, 2:07am UTC](https://discuss.elastic.co/t/can-elasticsearch-log-how-many-result-found-for-a-slow-query/61408/2 "2016-09-24T02:07:11Z")

</div>

That sounds like a good idea to me. Can you open an issue for it on GitHub?  
Maybe there already is an issue for it? If so go and comment on it!

One fun thing is that the slow logos per shard nor for the whole query,  
iirc. In that case only the number of hits on that shard are available, not  
the total.

---

<div class="post-metadata">

**Author:** ![suanmeiguo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/suanmeiguo/32/11758_2.png) [@suanmeiguo](https://discuss.elastic.co/u/suanmeiguo)\
**Post date:** [September 24, 2016, 2:17am UTC](https://discuss.elastic.co/t/can-elasticsearch-log-how-many-result-found-for-a-slow-query/61408/3 "2016-09-24T02:17:40Z")

</div>

Thank you Nik! Just added the issue here: [https://github.com/elastic/elasticsearch/issues/20648](https://github.com/elastic/elasticsearch/issues/20648)

---

<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 5, 2017, 10:17pm UTC](https://discuss.elastic.co/t/can-elasticsearch-log-how-many-result-found-for-a-slow-query/61408/4 "2017-07-05T22:17:33Z")

</div>


