# How to find all fields that don't have values?

**URL:** <https://discuss.elastic.co/t/how-to-find-all-fields-that-dont-have-values/213232>\
**Category:** Elasticsearch\
**Created:** [December 27, 2019, 10:26pm UTC](https://discuss.elastic.co/t/how-to-find-all-fields-that-dont-have-values/213232 "2019-12-27T22:26:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rgelb](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@rgelb](https://discuss.elastic.co/u/rgelb)\
**Post date:** [December 27, 2019, 10:26pm UTC](https://discuss.elastic.co/t/how-to-find-all-fields-that-dont-have-values/213232/1 "2019-12-27T22:26:51Z")

</div>

I have an index that has around a thousand fields and several million documents. Many of the fields are empty.

How can I query the index to find out which fields do not have values?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 28, 2019, 3:17am UTC](https://discuss.elastic.co/t/how-to-find-all-fields-that-dont-have-values/213232/2 "2019-12-28T03:17:41Z")

</div>

See [https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html#find-docs-null-values](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html#find-docs-null-values)

---

<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 25, 2020, 3:27am UTC](https://discuss.elastic.co/t/how-to-find-all-fields-that-dont-have-values/213232/3 "2020-01-25T03:27:47Z")

</div>

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