Are there any known ways to simulate the newer
X-Opaque-Id semantics for
/_search requests in older versions of Elasticsearch (specifically 5.3.x)?
One approach I considered is co-opting the
_name field as described in https://stackoverflow.com/questions/42844111/is-it-possible-to-put-a-comment-in-an-elasticsearch-query and https://github.com/elastic/elasticsearch/issues/30576. However, this approach doesn't work without disruption (requires at least one
bool query) and likely has performance implications associated with
matched_queries processing. Another approach I've thought might make sense is using
source.excludes and including a bogus field that contains a correlation id that can be used for joining with external systems for the purposes of tracing (see How to track user actions (process list)? for similar in later versions).
Any ideas for improvements would be greatly appreciated!