Docs Menu
Docs Home
/
MongoDB Manual
/ / /

Logical Query Predicate Operators

On this page

  • Compatibility

Logical operators return data based on boolean logic (and, or, and nor).

Name
Description

$and

Joins query clauses with a logical AND and returns documents that match the conditions of all clauses.

Joins query clauses with a logical NOR and returns all documents that fail to match all clauses.

Inverts the effect of a query predicate and returns documents that do not match the query predicate.

Joins query clauses with a logical OR and returns all documents that match at least one clause.

You can use comparison operators for deployments hosted in the following environments:

  • MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud

Back

$polygon

On this page