# Document Modeling

**URL:** <https://discuss.elastic.co/t/document-modeling/91159>\
**Category:** Elasticsearch\
**Created:** [June 28, 2017, 5:29pm UTC](https://discuss.elastic.co/t/document-modeling/91159 "2017-06-28T17:29:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Egg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_egg/32/19539_2.png) [@Alex\_Egg](https://discuss.elastic.co/u/Alex_Egg)\
**Post date:** [June 28, 2017, 5:29pm UTC](https://discuss.elastic.co/t/document-modeling/91159/1 "2017-06-28T17:29:47Z")

</div>

I am trying to model this structure in ES:

A document has many exhibits. So my type would be Document, where a Document can have a parent or many children Documents.

So for example, If I do a full-text query and it might return a document B. If B is a child of document A (the parent), I can then see B in the results but also get a reference to A.

How can I model this relationship/query?

---

<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 26, 2017, 5:29pm UTC](https://discuss.elastic.co/t/document-modeling/91159/2 "2017-07-26T17:29:48Z")

</div>

Closed on July 26, 2017, 5:29pm UTC

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