Stay organized with collections
Save and categorize content based on your preferences.
Supported features: 3.6
The following tables include a breakdown of MongoDB 3.6 features supported by
Firestore with MongoDB compatibility. For differences in behavior, see
Behavior differences.
Query and projection operators
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
Comment operator
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
Firestore with MongoDB compatibility supports the following update operators.
Array operators
Operator
Supported
$
No
$[]
No
$[<identifier>]
No
$addToSet
No
$pop
No
$pull
No
$pullAll
No
$push
No
Bitwise operators
Operator
Supported
$bit
Yes
Field operators
Operator
Supported
$currentDate
Yes
$inc
Yes
$max
Yes
$min
Yes
$mul
Yes
$rename
Yes
$setOnInsert
Yes
Update modifiers
Modifier
Supported
$each
No
$position
No
$slice
No
$sort
No
Aggregation pipeline operators
Firestore with MongoDB compatibility supports the following aggregation pipeline operators.
Accumulator expressions
Expression
Supported
$addToSet
No
$avg
Yes
$count
Yes
$first
Yes
$last
Yes
$max
Yes
$min
Yes
$push
Yes
$stdDevPop
No
$stdDevSamp
No
$sum
Yes
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
$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
$objectToArray
No
$range
No
$reduce
No
$reverseArray
Yes
$size
Yes
$slice
Yes
$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
Date operators
Operator
Supported
$dateFromParts
No
$dateFromString
Yes
$dateToParts
Yes
$dateToString
Yes
$dayOfMonth
Yes
$dayOfWeek
Yes
$dayOfYear
Yes
$hour
Yes
$isoDayOfWeek
Yes
$isoWeek
Yes
$isoWeekYear
Yes
$millisecond
Yes
$minute
Yes
$month
Yes
$second
Yes
$week
Yes
$year
Yes
Miscellaneous operators
Operator
Supported
$literal
Yes
$mergeObjects
No
$natural
No
Set operators
Operator
Supported
$allElementsTrue
No
$anyElementTrue
No
$setDifference
No
$setEquals
No
$setIntersection
No
$setIsSubset
No
$setUnion
No
Stage operators
Operator
Supported
$addFields
Yes
$bucket
No
$bucketAuto
No
$collStats
No
$count
Yes
$currentOp
No
$facet
No
$geoNear
No
$graphLookup
No
$group
Yes
$indexStats
No
$limit
Yes
$listLocalSessions
No
$listSessions
No
$lookup
No
$match
Yes
$out
No
$project
Yes
$redact
No
$replaceRoot
Yes
$sample
No
$set
Yes
$skip
Yes
$sort
Yes
$sortByCount
Yes
$unset
Yes
$unwind
Yes
String operators
Operator
Supported
$concat
Yes
$indexOfBytes
Yes
$indexOfCP
Yes
$split
Yes
$strcasecmp
Yes
$strLenBytes
Yes
$strLenCP
Yes
$substr
Yes
$substrBytes
Yes
$substrCP
Yes
$toLower
Yes
$toUpper
Yes
System variables
Variable
Supported
$$CURRENT
No
$$DESCEND
No
$$KEEP
No
$$PRUNE
No
$$REMOVE
Yes
$$ROOT
Yes
Text search operators
Operator
Supported
$meta
No
Type conversion operators
Operator
Supported
$type
No
Variable operators
Operator
Supported
$let
No
$map
No
Geospatial
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
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
Partial
No
Non-Sparse
Yes
Sparse
Yes
Text
No
TTL
No
Unique
No
Database commands
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
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
endSessions
Yes
killAllSessions
No
killAllSessionsByPattern
No
killSessions
No
refreshSessions
No
startSession
Sessions can be started using the startSession driver method.
Administrative commands
Firestore with MongoDB compatibility supports the following administrative commands.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-09 UTC."],[],[]]