Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
APPLIES TO:
MongoDB vCore
The $bitsAllClear
operator is used to match documents where all the bit positions specified in a bitmask are clear (that is, 0). This operator is useful in scenarios where you need to filter documents based on specific bits being unset in a binary representation of a field.
Syntax
The syntax for the $bitsAllClear
operator is as follows:
{
<field>: {
$bitsAllClear: <bitmask>
}
}
Parameters
Description | |
---|---|
field |
The field in the document to be evaluated. |
count |
A bitmask where each bit position specifies the corresponding bit position in the field's value that must be clear (0). |
Related content
- Review options for Migrating from MongoDB to Azure Cosmos DB for MongoDB (vCore)
- Read more about Feature compatibility with MongoDB