“文档” 菜单
文档首页
/
MongoDB 驱动程序
/

Amazon DocumentDB 兼容性

在此页面上

  • 版本信息
  • 兼容性
  • 支持
Amazon DocumentDB 徽标

Amazon DocumentDB(兼容 MongoDB) 是一项快速、可靠且完全托管的数据库服务。Amazon DocumentDB 可让您在云中轻松设置、操作和扩展与 MongoDB 兼容的数据库。 借助 Amazon DocumentDB,您可以运行与 MongoDB 相同的应用程序代码,并使用相同的驱动程序和工具。

Amazon DocumentDB 支持 MongoDB v4.0 和 MongoDB v5.0。这些版本不支持 MongoDB Atlas 上可用的 MongoDB 版本中的所有新特性和功能。

提示

MongoDB 版本历史记录

要了解有关 MongoDB 各版本可用功能的更多信息,请参阅 MongoDB Evolved - 版本历史记录

截至 2023 年 11 月,Amazon DocumentDB 与 MongoDB API 的兼容度约为 34 %。

在 Amazon DocumentDB 上,以下 MongoDB 功能仅部分可用或根本不受支持:

  • 功能:固定大小集合map-reduce 操作GridFS文本索引部分索引不区分大小写的索引

  • 命令 collModcreateViewfilemd5reIndexconnPoolStatsdbHashfeatures 、分片命令( enableShardingshardCollection除外)

  • 查询操作符$expr$text$where$meta$box$center$centerSphere$polygon$near

  • 聚合操作符$accumulator$count$ceil$exp$floor$ln$log$log10$pow$sqrt$trunc$round , $first , $last , $switch , $binarySize , $bsonSize , $dateFromParts , $dateToParts , $dateTrunc , $dateDiff , $setDifference , $anyElementTrue , $allElementsTrue , $ltrim$rtrim$trim$regexFind$regexFindAll$regexMatch$replaceOne$replaceAll$convert$toBool$toDate$toDecimal$toDouble$toInt$toLong$toObjectId$toString$isNumber$rand$sampleRate$getField

  • 聚合阶段$collStats$facet$bucket$bucketAuto$sortByCount$listLocalSessions$listSessions$graphLookup

此外,当您执行包含以下任意操作符的查询时,Amazon DocumentDB 不会利用索引:

  • $ne

  • $nin

  • $nor

  • $not

  • $exists

  • $elemMatch

要了解有关 Amazon DocumentDB 与 MongoDB v4.0 和 MongoDB v5.0 兼容性的更多信息,请参阅以下 Amazon Web Services 文档:

如需了解 Amazon DocumentDB 和 MongoDB 之间最新的兼容性状态,请参阅 Amazon DocumentDB 是否与 MongoDB Atlas 兼容?网站。

MongoDB 不为 Amazon DocumentDB 提供商业支持。如需有关此产品的帮助,请联系 AWS 支持团队

后退

对其他文档数据库的兼容性

来年

Azure Cosmos DB 兼容性