# Left join

**URL:** <https://discuss.elastic.co/t/left-join/139508>\
**Category:** Elasticsearch\
**Created:** [July 11, 2018, 8:27am UTC](https://discuss.elastic.co/t/left-join/139508 "2018-07-11T08:27:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![memorandum](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@memorandum](https://discuss.elastic.co/u/memorandum)\
**Post date:** [July 11, 2018, 8:27am UTC](https://discuss.elastic.co/t/left-join/139508/1 "2018-07-11T08:27:43Z")

</div>

I have 3 documents...

{  
@id:1,  
@type: driver,  
name: jos,  
surname: hatch,  
}

{  
@id:2,  
@type:driver,  
name: elo,  
surname: jim,  
}

{  
@id:444,  
@type:car,  
color:red,  
driver:[1,2]  
}

Is it possible in elasticsearch to make a query to obtain this?

{  
@id:444,  
@type:car,  
driver:[{name: jos, surname: hatch,},{name: elo,surname: jim,}],  
color:red  
}

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [July 11, 2018, 11:02am UTC](https://discuss.elastic.co/t/left-join/139508/2 "2018-07-11T11:02:30Z")

</div>

Elasticsearch does not support joins. It is possible to get limited join-like behaviour through the use of [parent-child relationships](https://www.elastic.co/guide/en/elasticsearch/reference/current/parent-join.html), but this comes with a number of limitations and can be slow, so it is generally recommended to instead denormalise your data.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 8, 2018, 11:02am UTC](https://discuss.elastic.co/t/left-join/139508/3 "2018-08-08T11:02:34Z")

</div>

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