# Elasticsearch took field

**URL:** <https://discuss.elastic.co/t/elasticsearch-took-field/63687>\
**Category:** Elasticsearch\
**Created:** [October 23, 2016, 5:02pm UTC](https://discuss.elastic.co/t/elasticsearch-took-field/63687 "2016-10-23T17:02:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhijith\_reddy](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@abhijith\_reddy](https://discuss.elastic.co/u/abhijith_reddy)\
**Post date:** [October 23, 2016, 5:02pm UTC](https://discuss.elastic.co/t/elasticsearch-took-field/63687/1 "2016-10-23T17:02:09Z")

</div>

When using the search api elasticsearch returns "took" as part of the response, which gives some insight into the query execution time, however I don't get that using the count API.

Is there a way to get some timing information from elasticsearch for count queries ?

If not, are search and count APIs identical in terms of performance when only using filters ? Basically would there be any performance hit if I use the search api to the get counts ? (Assuming I set "size": 0 in the request body so ES doesn't returns hits)

---

<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:** [October 25, 2016, 5:32pm UTC](https://discuss.elastic.co/t/elasticsearch-took-field/63687/2 "2016-10-25T17:32:34Z")

</div>

> [@abhijith\_reddy](#):
>
> however I don't get that using the count API.

The search and count APIs ought to be identical in terms of performance if you set `size=0`, yes. I'd experiment with setting adding a `constant_score_query` just to make sure that we're not calculating scores with 0 size but I believe we aren't.

---

<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:09pm UTC](https://discuss.elastic.co/t/elasticsearch-took-field/63687/3 "2017-07-05T22:09:53Z")

</div>


