What does _search api stats tag do?

I am trying to collect data while a user is using the _search API and I stumbled into a tag that can be put into the search query that might simplify everything for me but I can't find enough information on it.

Does the stats tag in a _search body affect anything; like the results returned?

The only information I could find on it was this page https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html and all that it states is String, String[], Boolean — Specific tag of the request for logging and statistical purposes . Is elasticsearch actually logging it somewhere?

Example of my _search request:

GET myindex/doc/_search
{
  "query": {
    "match_all": {}
  }, 
  "stats": ["my string of data"]
}

This question was answered for me here: https://stackoverflow.com/questions/52488959/what-does-elasticsearch-search-api-stats-tag-do/52489368#52489368

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