# Getting All records with doc\_count \>= 2

**URL:** <https://discuss.elastic.co/t/getting-all-records-with-doc-count-2/302407>\
**Category:** Elasticsearch\
**Tags:** kql-kibana-query-language\
**Created:** [April 14, 2022, 9:01am UTC](https://discuss.elastic.co/t/getting-all-records-with-doc-count-2/302407 "2022-04-14T09:01:39Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [April 15, 2022, 12:39pm UTC](https://discuss.elastic.co/t/getting-all-records-with-doc-count-2/302407/4 "2022-04-15T12:39:44Z")

</div>

> [@minhaj\_shakeel](#):
>
> I want full records associated with these id's. Can someone help me with that?

The terms aggregation has a min\_doc\_count setting which does this but can be inaccurate if there are high numbers of ids that occur infrequently. It’s what I call the [Elizabeth Taylor problem](https://discuss.elastic.co/t/aggregation-based-on-terms-field-is-not-working/240423/3)  
If you have many unique rare terms you may need to look at a different strategy which we can discuss.

---

_[View the full topic](https://discuss.elastic.co/t/getting-all-records-with-doc-count-2/302407)._
