对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。
See how MongoDB 9.0 delivers up to 2x higher throughput.
MongoDB Branding Shape
Register now >
Docs 菜单

Amazon DocumentDB 兼容性

Amazon DocumentDB 声明支持MongoDB v4.0 和MongoDB v5.0。这些版本并不支持MongoDB Atlas上提供的MongoDB版本中的所有新功能和功能。即使是这些旧版本,DocumentDB 的兼容性也不完整,应用程序可能无法按预期运行。

提示

MongoDB 版本历史记录

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

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

  • 命令:collMod、collMod:expireAfterSeconds、copydb、createView、filemd5、reIndex、connPoolStats、dbHash、features、getLastError、getPrevError、parallelCollectionScan、resetError、endSessions、killAllSessionsByPattern、refreshSessions,分片命令(enableSharding 和 shardCollection 除外)

  • 查询运算符:$expr、$jsonSchema、$text、$where、$meta、$box、$center、$centerSphere、$polygon、$near、$uniqueDocs

  • 聚合操作符:$accumulator、$count、$stdDevPop、$stdDevSamp、$pow、$trunc、$round、$first、$last、$switch、$binarySize、$bsonSize , $dateFromParts, $dateToParts, $dateTrunc, $dateDiff, $ltrim, $rtrim, $trim, $regexFind, $regexFindAll, $regexMatch, $replaceOne, $replaceAll, $isNumber、$rand、$sampleRate、$getField

  • 聚合阶段:$collStats、$facet、$bucket、$bucketAuto、$sortByCount、$unionWith、$set、$setWindowFields、$unset、$listLocalSessions、$listSessions、$graphLookup、$merge、$planCacheStats

  • 游标方法:cursor.collation()、cursor.max()、cursor.min()、cursor.noCursorTimeout()、cursor.returnKey()、cursor.showRecordId()、cursor.tailable()

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

  • $ne

  • $nin

  • $nor

  • $not

  • $exists

  • $distinct

  • $elemMatch 用于嵌套查询时

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

MongoDB不为Amazon DocumentDB 提供商业支持。如需有关此产品的帮助,联系Amazon Web Services支持部门。

给本页内容打分