# Can we use Significant Terms Aggregation with parent-child structure

**URL:** <https://discuss.elastic.co/t/can-we-use-significant-terms-aggregation-with-parent-child-structure/208206>\
**Category:** Elasticsearch\
**Created:** [November 17, 2019, 8:12am UTC](https://discuss.elastic.co/t/can-we-use-significant-terms-aggregation-with-parent-child-structure/208206 "2019-11-17T08:12:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![darkwarrior](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@darkwarrior](https://discuss.elastic.co/u/darkwarrior)\
**Post date:** [November 17, 2019, 8:12am UTC](https://discuss.elastic.co/t/can-we-use-significant-terms-aggregation-with-parent-child-structure/208206/1 "2019-11-17T08:12:07Z")

</div>

Hello,  
I am following this eg =\> [https://opensourceconnections.com/blog/2016/09/09/better-recsys-elasticsearch/](https://opensourceconnections.com/blog/2016/09/09/better-recsys-elasticsearch/).  
But Instead of using array(as shown in the example) I want to create Parent-child structure for user-video model.  
I tried few things but not getting expected output.  
So my question is, can we use Significant Terms Aggregation with parent-child structure?  
Thanks in advance!

---

<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:** [November 17, 2019, 4:04pm UTC](https://discuss.elastic.co/t/can-we-use-significant-terms-aggregation-with-parent-child-structure/208206/2 "2019-11-17T16:04:38Z")

</div>

No, joins like that won’t work with significant\_terms. You need the related terms in the same doc.

---

<div class="post-metadata">

**Author:** ![darkwarrior](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@darkwarrior](https://discuss.elastic.co/u/darkwarrior)\
**Post date:** [November 18, 2019, 5:59am UTC](https://discuss.elastic.co/t/can-we-use-significant-terms-aggregation-with-parent-child-structure/208206/3 "2019-11-18T05:59:11Z")

</div>

ok thanks for ur reply!

---

<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:** [December 16, 2019, 5:59am UTC](https://discuss.elastic.co/t/can-we-use-significant-terms-aggregation-with-parent-child-structure/208206/4 "2019-12-16T05:59:12Z")

</div>

Closed on December 16, 2019, 5:59am UTC

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