# Search "took" time vs NodeStats.indices.search.query\_time\_in\_millis

**URL:** <https://discuss.elastic.co/t/search-took-time-vs-nodestats-indices-search-query-time-in-millis/7128>\
**Category:** Elasticsearch\
**Created:** [March 26, 2012, 2:00pm UTC](https://discuss.elastic.co/t/search-took-time-vs-nodestats-indices-search-query-time-in-millis/7128 "2012-03-26T14:00:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [March 26, 2012, 2:00pm UTC](https://discuss.elastic.co/t/search-took-time-vs-nodestats-indices-search-query-time-in-millis/7128/1 "2012-03-26T14:00:02Z")

</div>

Hi,

what should be the relation between search response "took" value and  
incremental change reported  
by NodeStats.indices.search.query\_time\_in\_millis ? Should they be in sync?  
I am testing it with 0.19.0 and I can see they can differ sometimes  
significantly (for example, search took = 75ms, incremental change in  
query\_time\_in\_millis = 156ms, or 36ms vs 19ms).

Sometimes I even notices situation, where query was executed but both  
response "took" and NodeStats.indices.search.query\_time\_in\_millis reported  
0ms

In my test I run string query with several facets and highlights. A single  
node.

Regards,  
Lukas

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [March 27, 2012, 1:11pm UTC](https://discuss.elastic.co/t/search-took-time-vs-nodestats-indices-search-query-time-in-millis/7128/2 "2012-03-27T13:11:07Z")

</div>

The "took" part of a search response refers to the whole search execution  
API process. The query\_time part in node stats or indices stats just refers  
to the time the query executed on a specific shard (or the shards on that  
node).

On Mon, Mar 26, 2012 at 4:00 PM, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) wrote:

> Hi,
> 
> what should be the relation between search response "took" value and  
> incremental change reported  
> by NodeStats.indices.search.query\_time\_in\_millis ? Should they be in sync?  
> I am testing it with 0.19.0 and I can see they can differ sometimes  
> significantly (for example, search took = 75ms, incremental change in  
> query\_time\_in\_millis = 156ms, or 36ms vs 19ms).
> 
> Sometimes I even notices situation, where query was executed but both  
> response "took" and NodeStats.indices.search.query\_time\_in\_millis reported  
> 0ms
> 
> In my test I run string query with several facets and highlights. A single  
> node.
> 
> Regards,  
> Lukas

---

<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, 3:34am UTC](https://discuss.elastic.co/t/search-took-time-vs-nodestats-indices-search-query-time-in-millis/7128/3 "2017-07-06T03:34:39Z")

</div>


