You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Review Azure Cosmos DB for MongoDB vCore supported features and syntax including; commands, query support, datatypes, aggregation, operators and indexes.
suvishodcitus
suvishod
abramees
cosmos-db
mongodb-vcore
conceptual
10/21/2023
MongoDB compatibility and feature support with Azure Cosmos DB for MongoDB vCore
Azure Cosmos DB for MongoDB vCore allows you to experience the familiar MongoDB advantages while accessing the enhanced enterprise features offered by Azure Cosmos DB. It ensures compatibility by following the MongoDB wire protocol, allowing you to leverage existing client drivers, SDKs and other tools you're already familiar with.
Protocol support
The supported operators and any limitations or exceptions are listed here. Any client driver that understands these protocols should be able to connect to Azure Cosmos DB for MongoDB. When you create Azure Cosmos DB for MongoDB vCore clusters, the endpoint is in the format *.mongocluster.cosmos.azure.com.
Query language support
Azure Cosmos DB for MongoDB provides comprehensive support for MongoDB query language constructs. Below you can find the detailed list of currently supported database commands, operators, stages, and options.
Note
This article only lists the supported server commands, and excludes client-side wrapper functions. Client-side wrapper functions such as deleteMany() and updateMany() internally utilize the delete() and update() server commands. Functions utilizing supported server commands are compatible with the Azure Cosmos DB for MongoDB.
Database commands
Azure Cosmos DB for MongoDB vCore supports the following database commands:
Category
Command
Supported
Aggregation Commands
aggregate
Yes
count
Yes
distinct
Yes
mapReduce
Deprecated
Authentication Commands
authenticate
Yes
getnonce
Yes
logout
Yes
Geospatial Commands
geoSearch
Deprecated
Query Plan Cache Commands
No
Administrative Commands
cloneCollectionAsCapped
No. Capped collections are currently not supported.
collMod
Partial
compact
No
connPoolSync
Deprecated
convertToCapped
No. Capped collections are currently not supported.
create
Partial
createIndexes
Yes
currentOp
Yes
drop
Yes
dropDatabase
Yes
dropConnections
As a PaaS service, this will be managed by Azure.
dropIndexes
Yes
filemd5
No
fsync
As a PaaS service, this will be managed by Azure.
fsyncUnlock
As a PaaS service, this will be managed by Azure.
getDefaultRWConcern
Yes
getClusterParameter
No
getParameter
Yes
killCursors
Yes
killOp
Yes
listCollections
Yes
listDatabases
Yes
listIndexes
Yes
logRotate
As a PaaS service, this will be managed by Azure.
reIndex
Yes
renameCollection
Yes
rotateCertificates
As a PaaS service, this will be managed by Azure.
setFeatureCompatibilityVersion
As a PaaS service, this will be managed by Azure.
setIndexCommitQuorum
No
setParameter
Partial
setDefaultRWConcern
No
shutdown
As a PaaS service, this will be managed by Azure.
User & Role Management Commands
Not supported today, but will be made available through Azure Active Directory in the future.
Replication Commands
Azure manages replication, removing the necessity for customers to replicate manually.
Sharding Commands
enableSharding
Yes
isdbgrid
Yes
reshardCollection
Yes
shardCollection
Yes
unsetSharding
Deprecated
addShard
As a Platform-as-a-Service (PaaS) offering, Azure manages shard management and rebalancing. Users only need to specify the sharding strategy for the collections and Azure will handle the rest.
addShardToZone
clearJumboFlag
cleanupOrphaned
removeShard
removeShardFromZone
setShardVersion
mergeChunks
checkShardingIndex
getShardMap
getShardVersion
medianKey
splitVector
shardingState
cleanupReshardCollection
flushRouterConfig
balancerCollectionStatus
balancerStart
balancerStatus
balancerStop
configureCollectionBalancing
listShards
split
moveChunk
updateZoneKeyRange
movePrimary
abortReshardCollection
commitReshardCollection
refineCollectionShardKey
reshardCollection
No
Query and Write Operation Commands
change streams
No
delete
Yes
find
Yes
findAndModify
Yes
getLastError
Yes
getMore
Partial
insert
Yes
resetError
Deprecated
update
Yes
Session Commands
abortTransaction
Yes
commitTransaction
Yes
endSessions
Yes
killAllSessions
No
killAllSessionsByPattern
No
killSessions
Yes
refreshSessions
No
startSession
Yes
Diagnostic Commands
availableQueryOptions
No
buildInfo
Yes
collStats
Yes
connPoolStats
No
connectionStatus
Partial
dataSize
No
dbHash
No
dbStats
Yes
driverOIDTest
As a PaaS service, this will be managed by Azure.
explain
Yes
features
As a PaaS service, this will be managed by Azure.
getCmdLineOpts
Yes
getLog
Yes
hostInfo
Partial
_isSelf
No
listCommands
Yes
lockInfo
No
netstat
No
ping
Yes
profile
As a PaaS service, this will be managed by Azure.
serverStatus
Yes
shardConnPoolStats
Deprecated
top
No
validate
Yes
whatsmyuri
Yes
System Events Auditing Commands
logApplicationMessage
No
Operators
Below are the list of operators currently supported on Azure Cosmos DB for MongoDB vCore:
Note
The $lookup aggregation does not yet support using variable expressions using 'let'.
AvgObjsize and size in "collStats" works with document size less than 2KB only.
Azure Cosmos DB for MongoDB vCore supports the following indexes and index properties:
Note
Creating a unique index obtains an exclusive lock on the collection for the entire duration of the build process. This blocks read and write operations on the collection until the operation is completed.