# Cardinality accuracy for very low cardinality

**URL:** <https://discuss.elastic.co/t/cardinality-accuracy-for-very-low-cardinality/153509>\
**Category:** Elasticsearch\
**Created:** [October 23, 2018, 2:47am UTC](https://discuss.elastic.co/t/cardinality-accuracy-for-very-low-cardinality/153509 "2018-10-23T02:47:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eelixa](https://avatars.discourse-cdn.com/v4/letter/e/f0a364/32.png) [@eelixa](https://discuss.elastic.co/u/eelixa)\
**Post date:** [October 23, 2018, 2:47am UTC](https://discuss.elastic.co/t/cardinality-accuracy-for-very-low-cardinality/153509/1 "2018-10-23T02:47:07Z")

</div>

Hi,

I'm wanting to use a cardinality aggregation to determine whether the value of a particular field is unique among my data. Essentially I am just interested in whether the cardinality is exactly 1, or above 1. I don't care about the exact count unless it is exactly equal to 1, which is important to know.

I understand that the cardinality may not be completely accurate in all cases, and there is a `precision_threshold` option to allow for greater accuracy.

The docs state:

> The `precision_threshold` options allows to trade memory for accuracy, and defines a unique count below which counts are expected to be close to accurate.

It's not clear to me exactly what "expected to be close to accurate" means. With the default value of 3000, what I want to confirm is whether this means I can guaranteed that if the cardinality was 1, I would be returned that value in all cases.

Thanks.

---

<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:** [November 20, 2018, 2:47am UTC](https://discuss.elastic.co/t/cardinality-accuracy-for-very-low-cardinality/153509/2 "2018-11-20T02:47:08Z")

</div>

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