You are viewing an offline version of MongoDB documentation. Some page features might be unavailable. To view the latest version of the page or use interactive features, visit the live page.
Comparison operators filter data with value comparisons such as less than and greater than.
For comparison of different BSON type values, see the specified BSON comparison order.
Operator | Description |
|---|---|
Matches values equal to a specified value. | |
Matches values greater than a specified value. | |
Matches values greater than or equal to a specified value. | |
Matches any values specified in an array. | |
Matches values less than a specified value. | |
Matches values less than or equal to a specified value. | |
Matches all values not equal to a specified value. | |
Matches if the value is not equal to any of a given list of values. |