# Parent/Child Self Referencing documents

**URL:** https://discuss.elastic.co/t/parent-child-self-referencing-documents/10929
**Category:** Elasticsearch
**Created:** [February 27, 2013, 4:04pm UTC](https://discuss.elastic.co/t/parent-child-self-referencing-documents/10929 "2013-02-27T16:04:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Andrew\_Ochsner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_ochsner/32/1287_2.png) [@Andrew\_Ochsner](https://discuss.elastic.co/u/Andrew_Ochsner)
#### Post date: [February 27, 2013, 4:04pm UTC](https://discuss.elastic.co/t/parent-child-self-referencing-documents/10929/1 "2013-02-27T16:04:33Z")

</div>

Hello:

We are going to start indexing transaction/activity information and these  
can be nested within each other (like a stack frame). So activity A is the  
parent of activity B & C etc. Is there any support (or plans) to handle  
this type of parent/child relationship? Any suggestions on how to approach  
mapping these events? The main type of query that would take advantage of  
this structure would be something like "given a root activity id, display  
the tree of activities stemming off of it"

Thanks!  
Andy Ochsner

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![ppearcy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppearcy/32/980_2.png) [@ppearcy](https://discuss.elastic.co/u/ppearcy)
#### Post date: [February 27, 2013, 8:13pm UTC](https://discuss.elastic.co/t/parent-child-self-referencing-documents/10929/2 "2013-02-27T20:13:46Z")

</div>

Play around with the nested type:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

I think it will work for you. There are also some parent/child document  
relationships. Some easier to follow details on both these are here:

> **[Fun with elasticsearch's children and nested documents - Space Vatican](https://www.spacevatican.org/2012/6/3/fun-with-elasticsearch-s-children-and-nested-documents/)**
>
> When you’re indexing data, the world is rarely as simple as each document existing in isolation. Sometimes, you’re better off …

Best Regards,  
Paul

On Wednesday, February 27, 2013 9:04:33 AM UTC-7, Andrew Ochsner wrote:

> Hello:
> 
> We are going to start indexing transaction/activity information and these  
> can be nested within each other (like a stack frame). So activity A is the  
> parent of activity B & C etc. Is there any support (or plans) to handle  
> this type of parent/child relationship? Any suggestions on how to approach  
> mapping these events? The main type of query that would take advantage of  
> this structure would be something like "given a root activity id, display  
> the tree of activities stemming off of it"
> 
> Thanks!  
> Andy Ochsner

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:49am UTC](https://discuss.elastic.co/t/parent-child-self-referencing-documents/10929/3 "2017-07-06T02:49:11Z")

</div>


