# Querying for null values

**URL:** <https://discuss.elastic.co/t/querying-for-null-values/270455>\
**Category:** Elasticsearch\
**Created:** [April 17, 2021, 4:55pm UTC](https://discuss.elastic.co/t/querying-for-null-values/270455 "2021-04-17T16:55:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ruth\_Smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruth_smith/32/87244_2.png) [@Ruth\_Smith](https://discuss.elastic.co/u/Ruth_Smith)\
**Post date:** [April 17, 2021, 4:55pm UTC](https://discuss.elastic.co/t/querying-for-null-values/270455/1 "2021-04-17T16:55:45Z")

</div>

I'm new to Elasticsearch, using version 7.1.2. I am setting up an index which contains time-stamped records for users. I would like to find out how to search for all users who are not active (i.e. have no records) over a period of time. I can create another index which contains a list of all users, but am not sure how to combine the two in a query and search for null matches.

---

<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 15, 2021, 4:56pm UTC](https://discuss.elastic.co/t/querying-for-null-values/270455/2 "2021-05-15T16:56:32Z")

</div>

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