# Parent child relationships

**URL:** https://discuss.elastic.co/t/parent-child-relationships/18914
**Category:** Elasticsearch
**Created:** [July 26, 2014, 5:12am UTC](https://discuss.elastic.co/t/parent-child-relationships/18914 "2014-07-26T05:12:34Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Vijay\_kumar](https://avatars.discourse-cdn.com/v4/letter/v/9fc29f/32.png) [@Vijay\_kumar](https://discuss.elastic.co/u/Vijay_kumar)
#### Post date: [July 26, 2014, 5:12am UTC](https://discuss.elastic.co/t/parent-child-relationships/18914/1 "2014-07-26T05:12:34Z")

</div>

Hi all,

I have the following type mappings. How do i get all the children of a  
parent document in elasticsearch?

How to get all users of a particular tenant? Please help me

tenant: {

- properties: {

- user: {

## Thanks

Regards,  
Chitirala Nagendra Vijay Kumar

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAFNcDXHqx6%3DCU9npVycFdYvb1aiJAAyLjPi96gi4hDvBomZZEg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAFNcDXHqx6%3DCU9npVycFdYvb1aiJAAyLjPi96gi4hDvBomZZEg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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: [July 26, 2014, 8:05am UTC](https://discuss.elastic.co/t/parent-child-relationships/18914/2 "2014-07-26T08:05:08Z")

</div>

Look at [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-has-parent-filter.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-has-parent-filter.html)

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 26 juil. 2014 à 07:12, Vijay kumar [vijaykumarch.iitkgp@gmail.com](mailto:vijaykumarch.iitkgp@gmail.com) a écrit :

Hi all,

I have the following type mappings. How do i get all the children of a parent document in elasticsearch?

How to get all users of a particular tenant? Please help me

tenant: {  
properties: {  
organization: {  
index: not\_analyzed  
type: string  
}  
website: {  
index: not\_analyzed  
type: string  
}  
}

user: {  
\_routing: {  
required: true  
}  
properties: {  
email: {  
index: not\_analyzed  
type: string  
}  
password: {  
index: not\_analyzed  
type: string  
}  
}  
\_parent: {  
type: tenant  
}  
}

## Thanks

Regards,  
Chitirala Nagendra Vijay Kumar

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAFNcDXHqx6%3DCU9npVycFdYvb1aiJAAyLjPi96gi4hDvBomZZEg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAFNcDXHqx6%3DCU9npVycFdYvb1aiJAAyLjPi96gi4hDvBomZZEg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/42FE7593-EEEB-49B1-B338-286EB351499C%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/42FE7593-EEEB-49B1-B338-286EB351499C%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:12am UTC](https://discuss.elastic.co/t/parent-child-relationships/18914/3 "2017-07-06T01:12:57Z")

</div>


