# Find exact cardinality value

**URL:** https://discuss.elastic.co/t/find-exact-cardinality-value/110624
**Category:** Elasticsearch
**Created:** [December 7, 2017, 7:38am UTC](https://discuss.elastic.co/t/find-exact-cardinality-value/110624 "2017-12-07T07:38:21Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![shemilr](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@shemilr](https://discuss.elastic.co/u/shemilr)
#### Post date: [December 7, 2017, 7:38am UTC](https://discuss.elastic.co/t/find-exact-cardinality-value/110624/1 "2017-12-07T07:38:21Z")

</div>

Hi,

I want to find the exact cardinality value using the query. For lower value I am getting the correct result, but i want to get the correct value for all search.

Is it possible to get the exact value?  
Any alternative method to find the exact unique count of one filed?

```
[aggs] => Array
            (
                [variant_count] => Array
                    (
                        [cardinality] => Array
                            (
                                [field] => variant_id
                                [precision_threshold] => 40000
                            )

                    )

                [gene_count] => Array
                    (
                        [cardinality] => Array
                            (
                                [field] => gene_name
                                [precision_threshold] => 40000
                            )

                    )

                [gene_list] => Array
                    (
                        [terms] => Array
                            (
                                [field] => gene_name
                            )

                    )

            )
```

---

<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: [January 4, 2018, 7:38am UTC](https://discuss.elastic.co/t/find-exact-cardinality-value/110624/2 "2018-01-04T07:38:28Z")

</div>

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