For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

Logical Query Predicate Operators

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

Name
Description

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.