Amazon DocumentDB (with MongoDB compatibility) 在 8.0.1 版新增支援 46 個 MongoDB 運算子

張貼日期: 2026年7月13日

Amazon DocumentDB (with MongoDB compatibility) 現在從次要版本 8.0.1 起支援額外 46 個 MongoDB 彙總運算子和游標方法。此版本大幅擴展查詢 API 相容性,讓您更容易將 MongoDB 工作負載移轉至 Amazon DocumentDB,無需變更應用程式碼。

新功能涵蓋七個類別:

  • 累加器 (13):$top、$topN、$bottom、$bottomN、$firstN、$lastN、$maxN、$minN、$count、$median、$percentile、$stdDevPop、$stdDevSamp

  • 三角函數 (15):$sin、$cos、$tan、$asin、$acos、$atan、$atan2、$sinh、$cosh、$tanh、$asinh、$acosh、$atanh、$degreesToRadians、$radiansToDegrees 

  • 位元聚合 (4):$bitAnd、$bitOr、$bitXor、$bitNot

  • 算術 (3):$round、$trunc、$sigmoid

  • 資料大小和類型 (4):$binarySize、$bsonSize、$isNumber、$toUUID

  • 時間戳記 (2):$tsIncrement、$tsSecond 

  • 階段和其他項目 (5):$sortByCount、$listSearchIndexes、$sampleRate、cursor.min()、cursor.max()

自 Amazon DocumentDB 8.0.1 起,所有提供 Amazon DocumentDB 的區域皆可使用這些運算子。若要了解詳情,請參閱支援的 MongoDB API、操作和資料類型Amazon DocumentDB 版本備註