# Nested Vs. Parent/Child

**URL:** <https://discuss.elastic.co/t/nested-vs-parent-child/291189>\
**Category:** Elasticsearch\
**Created:** [December 8, 2021, 7:39am UTC](https://discuss.elastic.co/t/nested-vs-parent-child/291189 "2021-12-08T07:39:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dev\_test](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dev_test/32/79287_2.png) [@dev\_test](https://discuss.elastic.co/u/dev_test)\
**Post date:** [December 8, 2021, 7:39am UTC](https://discuss.elastic.co/t/nested-vs-parent-child/291189/1 "2021-12-08T07:39:12Z")

</div>

Hi, i am assigned to work on a people-to-follow suggestion list in a social media app.  
The list will be based on user contacts, facebook friends, people the user is interacting with, and nearby people according to geo-location. The people in the list are using the app but the user isn't currently following them.  
I am confused between whether to choose nested type relationship or parent/child relationship to create mapping for indexing contacts.

After indexing, while preparing result i will be using scoring functions to prioritize some users over other.

---

<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:** [January 5, 2022, 7:39am UTC](https://discuss.elastic.co/t/nested-vs-parent-child/291189/2 "2022-01-05T07:39:17Z")

</div>

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