# $exists

*noun*

say it: **“DOL-er ig-ZISTS”** **/ˈdɑlər ɪɡˈzɪsts/**

A MongoDB filter operator that matches documents by whether they have a certain field at all.

## What does **$exists** do in a MongoDB filter?

**$exists** matches documents by whether a field is there at all: `{ $exists: true }` finds documents that have it, whatever its value (even `null`), and `false` finds the ones without it.

```javascript
db.recipes.find({ notes: { $exists: false } }, { _id: 0, name: 1 });
// [ { name: 'Tea' } ]   (Toast has notes: null, so it isn't listed)
```

## In a sentence

- “Unlike a filter for null, **$exists** true finds a field even when it holds null.”
- “**$exists** set to false found the old recipes saved before the photo field was added.”

Level: Apprentice · [More MongoDB terms at this level](https://www.ask-codey.com/glossary?category=mongodb&level=2)

Updated: November 19, 2026

Source: https://www.ask-codey.com/glossary/exists
