# Most relevant children

**URL:** <https://discuss.elastic.co/t/most-relevant-children/27908>\
**Category:** Elasticsearch\
**Created:** [August 23, 2015, 6:38pm UTC](https://discuss.elastic.co/t/most-relevant-children/27908 "2015-08-23T18:38:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicocsgamer](https://avatars.discourse-cdn.com/v4/letter/n/898d66/32.png) [@nicocsgamer](https://discuss.elastic.co/u/nicocsgamer)\
**Post date:** [August 23, 2015, 6:38pm UTC](https://discuss.elastic.co/t/most-relevant-children/27908/1 "2015-08-23T18:38:27Z")

</div>

Hey guys,

In my application I'm using the parent/child relationship. I would like to perform a query on all fields of the parent and children, and for each parent returned I would like to filters the children by keeping the children with the better score.

At the end I would like to compute the score of each search result by summing the parent with the most relevant children, and i would like to perform Children Aggregation on the most relevant children.

Is it supported by ES? Is it possible to achieve it with inner hits?

Thanks.

---

<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 5, 2017, 11:54pm UTC](https://discuss.elastic.co/t/most-relevant-children/27908/2 "2017-07-05T23:54:20Z")

</div>


