# Using multi-term aggregation on rollup jobs

**URL:** https://discuss.elastic.co/t/using-multi-term-aggregation-on-rollup-jobs/341674
**Category:** Elasticsearch
**Created:** [August 25, 2023, 10:03am UTC](https://discuss.elastic.co/t/using-multi-term-aggregation-on-rollup-jobs/341674 "2023-08-25T10:03:38Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![hjazz6](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hjazz6/32/79007_2.png) [@hjazz6](https://discuss.elastic.co/u/hjazz6)
#### Post date: [August 25, 2023, 10:03am UTC](https://discuss.elastic.co/t/using-multi-term-aggregation-on-rollup-jobs/341674/1 "2023-08-25T10:03:38Z")

</div>

Hi,

Can I use multi-term aggregation on rollup jobs?

My goal is to save disk space on older data, which has 6 fields (say, Field1 to Field6). After the rollup, I would like to query for the presence of records with the same 4 fields (Field1 to Field4), and the value\_count of Field5 and Field6.

I thought I would have to use multi-term aggregation on Field1 to Field4 - can this be done?

Also, I guess the query results would only tell me how many unique values there are in Field5 and Field6, not the values and their corresponding count, right?

Thank you.

---

<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: [September 22, 2023, 10:03am UTC](https://discuss.elastic.co/t/using-multi-term-aggregation-on-rollup-jobs/341674/2 "2023-09-22T10:03:41Z")

</div>

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