# Problem in terms aggregation result buckets in rollup\_search

**URL:** <https://discuss.elastic.co/t/problem-in-terms-aggregation-result-buckets-in-rollup-search/191651>\
**Category:** Elasticsearch\
**Created:** [July 22, 2019, 1:45pm UTC](https://discuss.elastic.co/t/problem-in-terms-aggregation-result-buckets-in-rollup-search/191651 "2019-07-22T13:45:28Z")\
**Posts on this page:** 3\
**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:** [July 22, 2019, 1:45pm UTC](https://discuss.elastic.co/t/problem-in-terms-aggregation-result-buckets-in-rollup-search/191651/1 "2019-07-22T13:45:28Z")

</div>

Hello,

1. We have large number of documents on ES and coz of that we have created rollup job.
2. but we are facing a problem while performing terms aggregation.
3. We have one field as **city\_name** and there are thousands of unique **city\_names** present in our documents and we are performing **terms** aggregation on this field.
4. But while performing **rollup\_search** on our **rollup\_index** if we compare rollup\_search result of **live\_index+rollup\_index** with rollup\_search result of only **rollup\_index** we are not getting some city buckets in the later one (here we have kept everything similar for both the rollup\_searches, only difference is in first search we are using live\_index name with rollup-index name and in second one we are using **only** rollup-index name ).
5. But now if we check the rollup index using some **filters** targeted for the **missing** cities then we will get missing cities in the result.
6. So my point here is that those missing cities are present in rollup index but are not getting displayed in rollup-search (i.e the documents containing those cities are rolled-up).
7. And now if we increase the size of terms aggregation while performing rollup\_search we will get some of the missing cities in result.
8. Es version = 6.6.1  
Is there something I should try, am I missing something??  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![nikhil-bhat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikhil-bhat/32/53939_2.png) [@nikhil-bhat](https://discuss.elastic.co/u/nikhil-bhat)\
**Post date:** [July 30, 2019, 9:41am UTC](https://discuss.elastic.co/t/problem-in-terms-aggregation-result-buckets-in-rollup-search/191651/2 "2019-07-30T09:41:07Z")

</div>

Hi @darkwarrior i am also facing similar issue as described by you . writing this comment to increase visibility for this issue

---

<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:** [August 27, 2019, 9:41am UTC](https://discuss.elastic.co/t/problem-in-terms-aggregation-result-buckets-in-rollup-search/191651/3 "2019-08-27T09:41:08Z")

</div>

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