Difference of TOOK fields in Elasticsearch?

Hi,

When I ran an query in elasticsearch i got took as 43ms .

{
   "took": 43,
   "timed_out": false,
   "_shards": {
      "total": 5,
      "successful": 5,
      "failed": 0
   },

When i checked the slowlogs for that query and added all the took fields in 5 primaries and 1 replica i got total as 31.5 .
So, what is the difference between took field in ES response and took field in slowlog?

[2017-07-10 13:48:00,891][DEBUG][index.search.slowlog.fetch] [Guido Carosella] [data-2017][4] took[19.1ms], took_millis[19], types[], stats[], search_type[QUERY_THEN_FETCH], total_shards[5], source[{"_source":["My query"]},"query":{"terms":{"Id":[256]}}}}}], extra_source[],

And in both which should be considered for measuring performance of ES?

Thanks

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