# \_parent in top hits aggregation

**URL:** <https://discuss.elastic.co/t/-parent-in-top-hits-aggregation/23121>\
**Category:** Elasticsearch\
**Created:** [April 7, 2015, 6:53am UTC](https://discuss.elastic.co/t/-parent-in-top-hits-aggregation/23121 "2015-04-07T06:53:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maxim\_Valyanskiy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maxim_valyanskiy/32/787_2.png) [@Maxim\_Valyanskiy](https://discuss.elastic.co/u/Maxim_Valyanskiy)\
**Post date:** [April 7, 2015, 6:53am UTC](https://discuss.elastic.co/t/-parent-in-top-hits-aggregation/23121/1 "2015-04-07T06:53:27Z")

</div>

Hello!

We are using script field 'doc["\_parent"].value' to read parent id in tog  
hits aggregation. Is there better (more efficient) way to read it?

Maxim

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/917dd78e-4608-4b17-a11c-ea030e1b0065%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/917dd78e-4608-4b17-a11c-ea030e1b0065%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:21am UTC](https://discuss.elastic.co/t/-parent-in-top-hits-aggregation/23121/2 "2017-07-06T00:21:17Z")

</div>

Closed on July 6, 2017, 12:21am UTC


