Docs Menu
Docs Home
/
Database Manual
/ / /

Element Query Operators

Element operators return data based on field existence or data types.

Note

For details on a specific operator, including syntax and examples, click on the link to the operator's reference page.

Name
Description

$exists

Matches documents that have the specified field. Specifically, the $exists operator matches documents that contain or do not contain a specified field, including documents where the field value is null.

Selects documents if a field is of the specified type. $type selects documents where the value of the field is an instance of the specified BSON types. Querying by data type is useful when dealing with unstructured data where data types are not predictable.

Back

$or