# Significant Terms Aggregation to many fields

**URL:** <https://discuss.elastic.co/t/significant-terms-aggregation-to-many-fields/116116>\
**Category:** Elasticsearch\
**Created:** [January 18, 2018, 6:23pm UTC](https://discuss.elastic.co/t/significant-terms-aggregation-to-many-fields/116116 "2018-01-18T18:23:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![66f41c7883cae82367a4](https://avatars.discourse-cdn.com/v4/letter/6/74df32/32.png) [@66f41c7883cae82367a4](https://discuss.elastic.co/u/66f41c7883cae82367a4)\
**Post date:** [January 18, 2018, 6:23pm UTC](https://discuss.elastic.co/t/significant-terms-aggregation-to-many-fields/116116/1 "2018-01-18T18:23:30Z")

</div>

HI

I would like to how to make Significant Terms Aggregation on many fields

i found in the docs, that I can make aggregation over aggergation (parent) , but im afraid its only "affect" the doc\_count value and not the bg\_count value (the bg\_count value is to only one field)

my wish is the to have a doc\_count and bg\_count values, based on the two or more fields (score based on combination of fields,rather than one field)

any idea how to do it?

thanks,

---

<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:** [January 19, 2018, 3:02pm UTC](https://discuss.elastic.co/t/significant-terms-aggregation-to-many-fields/116116/2 "2018-01-19T15:02:06Z")

</div>

> [@66f41c7883cae82367a4](#):
>
> my wish is the to have a doc\_count and bg\_count values, based on the two or more fields (score based on combination of fields,rather than one field)

If I understand the question correctly you want significant terms where the count of docs containing a term is computed from either uses of the term in field 1 OR field 2.  
That is not possible using this aggregation. However you could use the `copy_to` feature of mapping definition s to create a combined field (e.g. "field1And2") and copy the contents of field 1 and 2 to it.

---

<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:** [February 16, 2018, 3:02pm UTC](https://discuss.elastic.co/t/significant-terms-aggregation-to-many-fields/116116/3 "2018-02-16T15:02:27Z")

</div>

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