Comparison Query Operators

Note

For details on specific operator, including syntax and examples,click on the specific operator to go to its reference page.

For comparison of different BSON type values, see the specifiedBSON comparison order.

NameDescription
$eqMatches values that are equal to a specified value.
$gtMatches values that are greater than a specified value.
$gteMatches values that are greater than or equal to a specified value.
$inMatches any of the values specified in an array.
$ltMatches values that are less than a specified value.
$lteMatches values that are less than or equal to a specified value.
$neMatches all values that are not equal to a specified value.
$ninMatches none of the values specified in an array.