Docs Home → Develop Applications → MongoDB Manual
Query and Projection Operators![](/docs/v5.2/assets/link.svg)
This version of the documentation is archived and no longer supported. View the current documentation to learn how to upgrade your version of MongoDB server.
Note
For details on specific operator, including syntax and examples, click on the specific operator to go to its reference page.
Query Selectors![](/docs/v5.2/assets/link.svg)
Comparison![](/docs/v5.2/assets/link.svg)
For comparison of different BSON type values, see the specified BSON comparison order.
Name | Description |
---|---|
Matches values that are equal to a specified value. | |
Matches values that are greater than a specified value. | |
Matches values that are greater than or equal to a specified value. | |
Matches any of the values specified in an array. | |
Matches values that are less than a specified value. | |
Matches values that are less than or equal to a specified value. | |
Matches all values that are not equal to a specified value. | |
Matches none of the values specified in an array. |
Logical![](/docs/v5.2/assets/link.svg)
Name | Description |
---|---|
Joins query clauses with a logical AND returns all documents that match the conditions of both clauses. | |
Inverts the effect of a query expression and returns documents that do not match the query expression. | |
Joins query clauses with a logical NOR returns all documents that fail to match both clauses. | |
Joins query clauses with a logical OR returns all documents that match the conditions of either clause. |
Element![](/docs/v5.2/assets/link.svg)
Evaluation![](/docs/v5.2/assets/link.svg)
Name | Description |
---|---|
Allows use of aggregation expressions within the query language. | |
Validate documents against the given JSON Schema. | |
Performs a modulo operation on the value of a field and selects documents with a specified result. | |
Selects documents where values match a specified regular expression. | |
Performs text search. | |
Matches documents that satisfy a JavaScript expression. |
Geospatial![](/docs/v5.2/assets/link.svg)
Name | Description |
---|---|
Selects geometries that intersect with a GeoJSON geometry.
The 2dsphere index supports
$geoIntersects . | |
Selects geometries within a bounding GeoJSON geometry. The 2dsphere and 2d indexes support
$geoWithin . | |
Returns geospatial objects in proximity to a point on a sphere.
Requires a geospatial index. The 2dsphere and 2d indexes support
$nearSphere . |
Array![](/docs/v5.2/assets/link.svg)
Name | Description |
---|---|
Matches arrays that contain all elements specified in the query. | |
Selects documents if element in the array field matches all the specified $elemMatch conditions. | |
Selects documents if the array field is a specified size. |
Bitwise![](/docs/v5.2/assets/link.svg)
Name | Description |
---|---|
Matches numeric or binary values in which a set of bit positions all have a value of 0 . | |
Matches numeric or binary values in which a set of bit positions all have a value of 1 . | |
Matches numeric or binary values in which any bit from a set of bit positions has a value of 0 . | |
Matches numeric or binary values in which any bit from a set of bit positions has a value of 1 . |
Projection Operators![](/docs/v5.2/assets/link.svg)
Name | Description |
---|---|
Projects the first element in an array that matches the query condition. | |
Projects the first element in an array that matches the specified $elemMatch condition. | |
Projects the document's score assigned during $text operation. | |
Limits the number of elements projected from an array. Supports skip and limit slices. |