# How to simulate X-Opaque-Id semantics in Elasticsearch 5.3

**URL:** <https://discuss.elastic.co/t/how-to-simulate-x-opaque-id-semantics-in-elasticsearch-5-3/217710>\
**Category:** Elasticsearch\
**Created:** [February 4, 2020, 12:57am UTC](https://discuss.elastic.co/t/how-to-simulate-x-opaque-id-semantics-in-elasticsearch-5-3/217710 "2020-02-04T00:57:07Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![btiernay-o](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/btiernay-o/32/61982_2.png) [@btiernay-o](https://discuss.elastic.co/u/btiernay-o)\
**Post date:** [February 4, 2020, 4:15pm UTC](https://discuss.elastic.co/t/how-to-simulate-x-opaque-id-semantics-in-elasticsearch-5-3/217710/2 "2020-02-04T16:15:56Z")

</div>

For the benefit of future readers, I see there is another approach using `stats`:

> [@Passing requestId in ES logs](https://discuss.elastic.co/t/passing-requestid-in-es-logs/99498/4):
>
> 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[{…

---

_[View the full topic](https://discuss.elastic.co/t/how-to-simulate-x-opaque-id-semantics-in-elasticsearch-5-3/217710)._
