# How to get number of queries execute on a certain type

**URL:** https://discuss.elastic.co/t/how-to-get-number-of-queries-execute-on-a-certain-type/62735
**Category:** Elasticsearch
**Created:** [October 11, 2016, 4:28pm UTC](https://discuss.elastic.co/t/how-to-get-number-of-queries-execute-on-a-certain-type/62735 "2016-10-11T16:28:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![lee891031](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@lee891031](https://discuss.elastic.co/u/lee891031)
#### Post date: [October 11, 2016, 4:28pm UTC](https://discuss.elastic.co/t/how-to-get-number-of-queries-execute-on-a-certain-type/62735/1 "2016-10-11T16:28:16Z")

</div>

Hi,

Is it possible to get number of queries/searched executed on a type in an certain index?

What I am going to do is to calculate query rate per type in an index, is it possible to do that?

---

<div class="post-metadata">

### Author: ![cbuescher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbuescher/32/60402_2.png) [@cbuescher](https://discuss.elastic.co/u/cbuescher)
#### Post date: [October 11, 2016, 5:47pm UTC](https://discuss.elastic.co/t/how-to-get-number-of-queries-execute-on-a-certain-type/62735/2 "2016-10-11T17:47:44Z")

</div>

Hi,

this is not done by default and I think there is no API that would give you this kind of statistics. But I saw people using (or abusing, depends on the point of view) the slow log do log all search and index requests to your cluster. This [blog](http://blog.florian-hopf.de/2016/03/logging-requests-to-elasticsearch.html) gives an idea of how to do this. You would have to filter and analyze the logs yourself to get the query rates though.

---

<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:13pm UTC](https://discuss.elastic.co/t/how-to-get-number-of-queries-execute-on-a-certain-type/62735/3 "2017-07-05T22:13:20Z")

</div>


