Hi @animageofmine,
stats groups are per request. You define them directly in your query. Copying the example that I gave in the other thread verbatim:
GET /_search
{
"query": {
"match_all": {}
},
"stats" : ["myapplication"]
}
This will show up in the slow query log as:
[2017-05-26 12:12:08,011][INFO ][index.search.slowlog.fetch] [Elven] [old_books][3] took[219.7micros], took_millis[0], types[], stats[myapplication], search_type[QUERY_THEN_FETCH], total_shards[5], source[{"query":{"match_all":{}},"stats":["myapplication"]}], extra_source[],
Daniel