# Join like querys

**URL:** https://discuss.elastic.co/t/join-like-querys/6672
**Category:** Elasticsearch
**Created:** [February 10, 2012, 4:13pm UTC](https://discuss.elastic.co/t/join-like-querys/6672 "2012-02-10T16:13:12Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Roi\_Rodriguez\_Sanche](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@Roi\_Rodriguez\_Sanche](https://discuss.elastic.co/u/Roi_Rodriguez_Sanche)
#### Post date: [February 10, 2012, 4:13pm UTC](https://discuss.elastic.co/t/join-like-querys/6672/1 "2012-02-10T16:13:12Z")

</div>

Hello,

We are plannig to use ElasticSearch as a unified index and data storage  
solution, by now we use Apache Solr and MySQL. We have recently read that  
Solr4 will bring the capability to make "join" querys  
([http://wiki.apache.org/solr/Join](http://wiki.apache.org/solr/Join), in fact is more like an inner query).

So, knowing that Solr and ElasticSearch are both based in Lucene... is that  
feature currently suported in ElasticSearch Query Language or is planned to  
be that feature in future releases of ElasticSearch?

Please excuse me, if I'm asking nosense... We have searched in the docs,  
but I think nested querys doesn't match our needs, as we have to make the  
query into two separated index.

Thanks in advance 🙂

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [February 12, 2012, 2:08pm UTC](https://discuss.elastic.co/t/join-like-querys/6672/2 "2012-02-12T14:08:59Z")

</div>

There is something similar, either using parent / child support (has\_child filter, with parent mapping), or using nested docs. Note, join is only supported within a shard, so we need to make sure the data exists within the same shard (parent child case, the child is placed in the same shard as the parent).

On Friday, February 10, 2012 at 6:13 PM, Roi Rodríguez Sánchez wrote:

> Hello,
> 
> We are plannig to use Elasticsearch as a unified index and data storage solution, by now we use Apache Solr and MySQL. We have recently read that Solr4 will bring the capability to make "join" querys ([http://wiki.apache.org/solr/Join](http://wiki.apache.org/solr/Join), in fact is more like an inner query).
> 
> So, knowing that Solr and Elasticsearch are both based in Lucene... is that feature currently suported in Elasticsearch Query Language or is planned to be that feature in future releases of Elasticsearch?
> 
> Please excuse me, if I'm asking nosense... We have searched in the docs, but I think nested querys doesn't match our needs, as we have to make the query into two separated index.
> 
> Thanks in advance 🙂

---

<div class="post-metadata">

### Author: ![Roi\_Rodriguez\_Sanche](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@Roi\_Rodriguez\_Sanche](https://discuss.elastic.co/u/Roi_Rodriguez_Sanche)
#### Post date: [February 13, 2012, 10:26am UTC](https://discuss.elastic.co/t/join-like-querys/6672/3 "2012-02-13T10:26:58Z")

</div>

Thank you... we will test if with this restrictions we can implement those  
capabilities.

---

<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: [July 6, 2017, 3:39am UTC](https://discuss.elastic.co/t/join-like-querys/6672/4 "2017-07-06T03:39:37Z")

</div>


