# Joining two documents with a unique session Id

**URL:** <https://discuss.elastic.co/t/joining-two-documents-with-a-unique-session-id/367066>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-monitoring, kql-kibana-query-language\
**Created:** [September 24, 2024, 4:38pm UTC](https://discuss.elastic.co/t/joining-two-documents-with-a-unique-session-id/367066 "2024-09-24T16:38:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sintim](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@sintim](https://discuss.elastic.co/u/sintim)\
**Post date:** [September 24, 2024, 4:38pm UTC](https://discuss.elastic.co/t/joining-two-documents-with-a-unique-session-id/367066/1 "2024-09-24T16:38:13Z")

</div>

Is it possible to join two documents in Elasticsearch based on the same session ID? The goal is to create a visualization that shows the field in one of the documents together with another field from the other document. for example, the two documents are request and response documents but then only the request document has a response type as success but not the response document.

I not only want to view the response with both documents but want to join several other fields from the request document.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 25, 2024, 6:02am UTC](https://discuss.elastic.co/t/joining-two-documents-with-a-unique-session-id/367066/2 "2024-09-25T06:02:02Z")

</div>

You can look at:

> **[Enrich your data | Elasticsearch Guide \[8.15\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-enriching-data.html)**
