# Terms Aggregration on Array of Strings with repeated values

**URL:** <https://discuss.elastic.co/t/terms-aggregration-on-array-of-strings-with-repeated-values/226490>\
**Category:** Elasticsearch\
**Created:** [April 4, 2020, 2:21am UTC](https://discuss.elastic.co/t/terms-aggregration-on-array-of-strings-with-repeated-values/226490 "2020-04-04T02:21:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![daveisfera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daveisfera/32/65654_2.png) [@daveisfera](https://discuss.elastic.co/u/daveisfera)\
**Post date:** [April 4, 2020, 2:21am UTC](https://discuss.elastic.co/t/terms-aggregration-on-array-of-strings-with-repeated-values/226490/1 "2020-04-04T02:21:54Z")

</div>

As a follow on to this previous post ( [Terms Aggregation on Array of String](https://discuss.elastic.co/t/terms-aggregation-on-array-of-string/195775) ), how can `value_count` be used to get the actual count of repeated values in an array? If a `value_count` is used with a `term` aggregation, then it counts all values and not just the ones that match the specific value for the bucket, so is there a way to apply a filter to account for that?

---

<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:** [May 2, 2020, 2:26am UTC](https://discuss.elastic.co/t/terms-aggregration-on-array-of-strings-with-repeated-values/226490/2 "2020-05-02T02:26:30Z")

</div>

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