# Term Stats facet with key\_field of parent document

**URL:** <https://discuss.elastic.co/t/term-stats-facet-with-key-field-of-parent-document/12959>\
**Category:** Elasticsearch\
**Created:** [July 26, 2013, 3:39pm UTC](https://discuss.elastic.co/t/term-stats-facet-with-key-field-of-parent-document/12959 "2013-07-26T15:39:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kul](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kul/32/2158_2.png) [@kul](https://discuss.elastic.co/u/kul)\
**Post date:** [July 26, 2013, 3:39pm UTC](https://discuss.elastic.co/t/term-stats-facet-with-key-field-of-parent-document/12959/1 "2013-07-26T15:39:47Z")

</div>

Is there way to create term\_stats facet such that key\_field is a parent  
document field?

I previously had a parent copied into each child doc. But i am wondering if  
this could be avoided using parent child relation?

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:24am UTC](https://discuss.elastic.co/t/term-stats-facet-with-key-field-of-parent-document/12959/2 "2017-07-06T02:24:16Z")

</div>


