Supported features: 8.0
Stay organized with collections
Save and categorize content based on your preferences.
The following tables include a breakdown of MongoDB 8.0 features supported by
Cloud Firestore with MongoDB compatibility. For differences in behavior, see
Behavior differences.
Query and projection operators
Cloud Firestore with MongoDB compatibility supports the following query and projection operators:
Array operators
Operator |
Supported |
$all |
Yes |
$elemMatch |
Yes |
$size |
Yes |
Bitwise operators
Operator |
Supported |
$bitsAllClear |
No |
$bitsAllSet |
No |
$bitsAnyClear |
No |
$bitsAnySet |
No |
Operator |
Supported |
$comment |
No |
Comparison operators
Operator |
Supported |
$eq |
Yes |
$gt |
Yes |
$gte |
Yes |
$in |
Yes |
$lt |
Yes |
$lte |
Yes |
$ne |
Yes |
$nin |
Yes |
Element operators
Operator |
Supported |
$exists |
Yes |
$type |
Yes |
Evaluation query operators
Operator |
Supported |
$expr |
Yes |
$jsonSchema |
No |
$mod |
Yes |
$regex |
Yes |
$text |
No |
$where |
No |
Logical operators
Operator |
Supported |
$and |
Yes |
$nor |
Yes |
$not |
Yes |
$or |
Yes |
Projection operators
Operator |
Supported |
$ |
No |
$elemMatch |
Yes |
$meta |
No |
$slice |
Yes |
Update operators
Cloud Firestore with MongoDB compatibility supports the following update operators.
Array operators
Operator |
Supported |
$ |
No |
$[] |
No |
$[<identifier>] |
No |
$addToSet |
No |
$pop |
No |
$pull |
Yes |
$pullAll |
No |
$push |
Yes |
Bitwise operators
Operator |
Supported |
$bit |
Yes |
Field operators
Operator |
Supported |
$currentDate |
Yes |
$inc |
Yes |
$max |
Yes |
$min |
Yes |
$mul |
Yes |
$rename |
Yes |
$set |
Yes |
$setOnInsert |
Yes |
$unset |
Yes |
Update modifiers
Modifier |
Supported |
$each |
No |
$position |
No |
$slice |
No |
$sort |
No |
Aggregation pipeline operators
Cloud Firestore with MongoDB compatibility supports the following aggregation pipeline operators.
Accumulator expressions
Expression |
Supported |
$accumulator |
No |
$addToSet |
No |
$avg |
Yes |
$bottom |
No |
$bottomN |
No |
$count |
Yes |
$first |
Yes |
$firstN |
No |
$last |
Yes |
$lastN |
No |
$max |
Yes |
$min |
Yes |
$minN |
No |
$push |
Yes |
$stdDevPop |
No |
$stdDevSamp |
No |
$sum |
Yes |
$top |
No |
$topN |
No |
Arithmetic operators
Operator |
Supported |
$abs |
Yes |
$add |
Yes |
$ceil |
Yes |
$divide |
Yes |
$exp |
No |
$floor |
Yes |
$ln |
No |
$log |
No |
$log10 |
No |
$mod |
Yes |
$multiply |
Yes |
$pow |
No |
$round |
Yes |
$sqrt |
No |
$subtract |
Yes |
$trunc |
No |
Array operators
Operator |
Supported |
$arrayElemAt |
Yes |
$arrayToObject |
Yes |
$concatArrays |
Yes |
$filter |
No |
$firstN |
No |
$in |
Yes |
$indexOfArray |
No |
$isArray |
Yes |
$lastN |
No |
$maxN |
No |
$minN |
No |
$objectToArray |
No |
$range |
No |
$reduce |
No |
$reverseArray |
Yes |
$size |
Yes |
$slice |
Yes |
$sortArray |
No |
$zip |
No |
Boolean operators
Operator |
Supported |
$and |
Yes |
$not |
Yes |
$or |
Yes |
Comparison operators
Operator |
Supported |
$cmp |
Yes |
$eq |
Yes |
$gt |
Yes |
$gte |
Yes |
$lt |
Yes |
$lte |
Yes |
$ne |
Yes |
Conditional expression operators
Operator |
Supported |
$cond |
Yes |
$ifNull |
Yes |
$switch |
Yes |
Data size operators
Operator |
Supported |
$binarySize |
No |
$bsonSize |
No |
Date operators
Operator |
Supported |
$dateAdd |
No |
$dateDiff |
No |
$dateFromParts |
No |
$dateFromString |
Yes |
$dateSubtract |
No |
$dateToParts |
Yes |
$dateToString |
Yes |
$dateTrunc |
No |
$dayOfMonth |
Yes |
$dayOfWeek |
Yes |
$dayOfYear |
Yes |
$hour |
Yes |
$isoDayOfWeek |
Yes |
$isoWeek |
Yes |
$isoWeekYear |
Yes |
$millisecond |
Yes |
$minute |
Yes |
$month |
Yes |
$second |
Yes |
$tsIncrement |
No |
$tsSecond |
No |
$week |
Yes |
$year |
Yes |
Miscellaneous operators
Operator |
Supported |
$getField |
Yes |
$literal |
Yes |
$mergeObjects |
No |
$natural |
No |
$rand |
No |
$sampleRate |
No |
Set operators
Operator |
Supported |
$allElementsTrue |
No |
$anyElementTrue |
No |
$setDifference |
No |
$setEquals |
No |
$setIntersection |
No |
$setIsSubset |
No |
$setUnion |
No |
$setWindowFields |
No |
Stage operators
Operator |
Supported |
$addFields |
Yes |
$bucket |
No |
$bucketAuto |
No |
$changeStreams |
No |
$collStats |
No |
$count |
Yes |
$currentOp |
No |
$documents |
Yes |
$facet |
No |
$geoNear |
No |
$graphLookup |
No |
$group |
Yes |
$indexStats |
No |
$limit |
Yes |
$listLocalSessions |
No |
$listSessions |
No |
$lookup |
No |
$match |
Yes |
$merge |
No |
$out |
No |
$planCacheStats |
No |
$project |
Yes |
$redact |
No |
$replaceRoot |
Yes |
$replaceWith |
Yes |
$sample |
No |
$set |
Yes |
$setWindowFields |
No |
$skip |
Yes |
$sort |
Yes |
$sortByCount |
Yes |
$unionWith |
No |
$unset |
Yes |
$unwind |
Yes |
String operators
Operator |
Supported |
$concat |
Yes |
$indexOfBytes |
Yes |
$indexOfCP |
Yes |
$ltrim |
Yes |
$regexFind |
Yes |
$regexFindAll |
Yes |
$regexMatch |
Yes |
$replaceAll |
Yes |
$replaceOne |
Yes |
$rtrim |
Yes |
$split |
Yes |
$strcasecmp |
Yes |
$strLenBytes |
Yes |
$strLenCP |
Yes |
$substr |
Yes |
$substrBytes |
Yes |
$substrCP |
Yes |
$toLower |
Yes |
$toUpper |
Yes |
$trim |
Yes |
System variables
Variable |
Supported |
$$CLUSTERTIME |
No |
$$CURRENT |
No |
$$DESCEND |
No |
$$KEEP |
No |
$$NOW |
Yes |
$$PRUNE |
No |
$$REMOVE |
Yes |
$$ROOT |
Yes |
Text search operators
Operator |
Supported |
$meta |
No |
$search |
No |
Trigonometry operators
Operator |
Supported |
$acos |
No |
$acosh |
No |
$asin |
No |
$asinh |
No |
$atan |
No |
$atan2 |
No |
$atanh |
No |
$cos |
No |
$cosh |
No |
$degreesToRadians |
No |
$radiansToDegrees |
No |
$sin |
No |
$sinh |
No |
$tan |
No |
$tanh |
No |
Type conversion operators
Operator |
Supported |
$convert |
No |
$isNumber |
Yes |
$toBool |
Yes |
$toDate |
No |
$toDecimal |
No |
$toDouble |
No |
$toInt |
No |
$toLong |
No |
$toObjectId |
No |
$toString |
No |
$type |
No |
Variable operators
Operator |
Supported |
$let |
No |
$map |
No |
Geospatial
Cloud Firestore with MongoDB compatibility supports the following Geospatial operators.
Geometry specifiers
Specifier |
Supported |
$box |
No |
$center |
No |
$centerSphere |
No |
$geometry |
No |
$maxDistance |
No |
$minDistance |
No |
$polygon |
No |
$uniqueDocs |
No |
Query selectors
Selector |
Supported |
$geoIntersects |
No |
$geoWithin |
No |
$near |
No |
$nearSphere |
No |
$nearSphere |
No |
$uniqueDocs |
No |
Indexes and index properties
Cloud Firestore with MongoDB compatibility supports the following indexes and index operators.
Indexes
Index type |
Supported |
2d |
No |
2dsphere |
No |
Compound |
Yes |
Hashed |
No |
Multikey |
Yes |
Single Field |
Yes |
Text |
No |
Index properties
Property |
Supported |
Background |
Yes |
Case Insensitive |
No |
Hidden |
No |
Partial |
No |
Non-Sparse |
Yes |
Sparse |
Yes |
Text |
No |
TTL |
No |
Unique |
No |
Wildcard |
No |
Vector |
No |
Database commands
Cloud Firestore with MongoDB compatibility supports the following database commands.
Aggregation
Command |
Supported |
aggregate |
Yes |
count |
Yes |
distinct |
Yes |
group |
No
The $group stage in aggregations is supported whereas the group command isn't.
|
mapReduce |
No |
Authentication
Command |
Supported |
authenticate |
No |
getnonce |
No |
logout |
No |
Query and write operations
Command |
Supported |
watch (Change Streams) |
No |
delete |
Yes |
eval |
No |
find |
Yes |
findAndModify |
Yes |
getLastError |
Yes |
getMore |
Yes |
getPrevError |
No |
GridFS |
No |
insert |
Yes |
parallelCollectionScan |
No |
replaceOne |
No
The replaceOne driver method is supported with the update command.
|
resetError |
No |
update |
Yes |
Session commands
Command |
Supported |
abortTransaction |
Yes |
commitTransaction |
Yes |
endSessions |
Yes |
killAllSessions |
No |
killAllSessionsByPattern |
No |
killSessions |
No |
refreshSessions |
No |
startSession |
Sessions can be started using the startSession driver method. |
Administrative commands
Cloud Firestore with MongoDB compatibility supports the following administrative commands.
Command |
Supported |
cloneCollectionAsCapped |
No |
collMod |
No |
collMod: expireAfterSeconds |
No |
convertToCapped |
No |
copydb |
No |
create |
Yes |
createIndexes |
No To create indexes, see Manage indexes. |
createView |
No |
currentOp |
No |
drop |
No |
dropDatabase |
No To delete a database, see Delete a database. |
dropIndexes |
No To delete indexes, see Manage indexes. |
filemd5 |
No |
getAuditConfig |
No |
killCursors |
Yes |
killOp |
No |
listCollections |
Yes |
listDatabases |
Yes |
listIndexes |
Yes |
reIndex |
No |
renameCollection |
No |
setAuditConfig |
No |
Diagnostic commands
Command |
Supported |
buildInfo |
Yes |
collStats |
No |
connectionStatus |
Yes |
connPoolStats |
No |
dataSize |
No |
dbHash |
No |
dbStats |
No |
explain |
Yes For behavior differences and limitations, see Query Explain |
features |
No |
hello |
Yes |
hostInfo |
Yes |
listCommands |
No |
profiler |
No |
serverStatus |
No |
top |
No |
whatsmyuri |
No |
Role management commands
To manage database access, Cloud Firestore with MongoDB compatibility supports
Identity and Access Management roles and permissions.
Command |
Supported |
createRole |
No |
dropAllRolesFromDatabase |
No |
dropRole |
No |
grantRolesToRole |
No |
revokePrivilegesFromRole |
No |
revokeRolesFromRole |
No |
rolesInfo |
No |
updateRole |
No |
What's next