# Searching nested objects with parent-child relationship

**URL:** <https://discuss.elastic.co/t/searching-nested-objects-with-parent-child-relationship/191687>\
**Category:** Elasticsearch\
**Created:** [July 22, 2019, 5:03pm UTC](https://discuss.elastic.co/t/searching-nested-objects-with-parent-child-relationship/191687 "2019-07-22T17:03:34Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [July 23, 2019, 10:43am UTC](https://discuss.elastic.co/t/searching-nested-objects-with-parent-child-relationship/191687/2 "2019-07-23T10:43:10Z")

</div>

Hi Slobbard,

`nested` and `parent/child` are 2 different approaches to joins.

- Nested is about storing related content in the same JSON but storing as neighbouring Lucene documents in an index.
- Parent/child is about storing parents and children in different JSON docs but routing them to the same shard.

Each has different indexing and query apis accordingly.

---

_[View the full topic](https://discuss.elastic.co/t/searching-nested-objects-with-parent-child-relationship/191687)._
