# Parent Child references to the Same Type

**URL:** <https://discuss.elastic.co/t/parent-child-references-to-the-same-type/21932>\
**Category:** Elasticsearch\
**Created:** [January 30, 2015, 6:38pm UTC](https://discuss.elastic.co/t/parent-child-references-to-the-same-type/21932 "2015-01-30T18:38:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darren\_McDaniel](https://avatars.discourse-cdn.com/v4/letter/d/b2d939/32.png) [@Darren\_McDaniel](https://discuss.elastic.co/u/Darren_McDaniel)\
**Post date:** [January 30, 2015, 6:38pm UTC](https://discuss.elastic.co/t/parent-child-references-to-the-same-type/21932/1 "2015-01-30T18:38:39Z")

</div>

Okay.. heres something Im trying to do... and it appears that elasticsearch  
is ignoring me...

i have a mapping for organizations :

put test\_index  
{  
"settings": {  
"number\_of\_replicas": 1,  
"number\_of\_shards": 25,  
"index.cache.field.type": "soft",  
"index.refresh\_interval": "10s",  
"index.store.compress.stored": true  
},  
"mappings": {  
"organization": {

```
     "_parent": {
        "type": "organization"
     },
     "_ttl": {
        "enabled": true
     }
  } 

```

}  
}

PUT test\_index/organization/org\_1?routing=1  
{  
"org\_wk":1  
}

put test\_index/organization/org\_2?parent=org\_1  
{

```
"org_wk":2
}

```

very basic... but I want the tree to be nested... so a single org.. can  
have n number of child orgs under it... so on and so forth....

Does anyone have any ideas why this wont work? Or how I can make it  
work???

Thanks!

--  
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/72e9d99d-de12-4d57-9662-a16194c0a755%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/72e9d99d-de12-4d57-9662-a16194c0a755%40googlegroups.com).  
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, 12:35am UTC](https://discuss.elastic.co/t/parent-child-references-to-the-same-type/21932/2 "2017-07-06T00:35:32Z")

</div>


