# Can i get bucket count of terms aggregation?

**URL:** <https://discuss.elastic.co/t/can-i-get-bucket-count-of-terms-aggregation/203561>\
**Category:** Elasticsearch\
**Created:** [October 15, 2019, 4:41am UTC](https://discuss.elastic.co/t/can-i-get-bucket-count-of-terms-aggregation/203561 "2019-10-15T04:41:32Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Yungyoung\_Ok](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yungyoung_ok/32/43465_2.png) [@Yungyoung\_Ok](https://discuss.elastic.co/u/Yungyoung_Ok)\
**Post date:** [October 21, 2019, 4:44am UTC](https://discuss.elastic.co/t/can-i-get-bucket-count-of-terms-aggregation/203561/3 "2019-10-21T04:44:36Z")

</div>

cardinality aggs does not produce the desired results.

please check this question...

> [@Can I access the field values in top hits aggs?](https://discuss.elastic.co/t/can-i-access-the-field-values-in-top-hits-aggs/202983):
>
> my data.... {"first\_seq":"aa", "second\_seq":1, "status":"LOADING"} {"first\_seq":"aa", "second\_seq":2, "status":"LOADING"} {"first\_seq":"aa", "second\_seq":3, "status":"LOADING"} {"first\_seq":"aa", "second\_seq":4, "status":"OK"} {"first\_seq":"bb", "second\_seq":10, "status":"LOADING"} {"first\_seq":"bb", "second\_seq":20, "status":"LOADING"} {"first\_seq":"bb", "second\_seq":30, "status":"LOADING"} {"first\_seq":"bb", "second\_seq":40, "status":"ERROR"} I only want to get {"first\_seq":"bb", "sec…

---

_[View the full topic](https://discuss.elastic.co/t/can-i-get-bucket-count-of-terms-aggregation/203561)._
