mongodb - Azure:不支持 DocumentDB Mongo $group

将我的 Mongo 应用程序迁移到 Azure 上的 DocumentDB 后,$group 查询不再有效,并引发以下错误:

{ MongoError: '$group' is not supported',
  name: 'MongoError',
  message: '\'$group\' is not supported',
  _t: 'OKMongoResponse',
  ok: 0,
  code: 115,
  errmsg: '\'$group\' is not supported',
  '$err': '\'$group\' is not supported' }

其他人以前遇到过这种情况并可能有任何建议吗?

最佳答案

有两种方法可以尝试

(i) 您可以尝试关注documentdb-lumenize由 Larry Maccherone 编写,提供聚合(分组、数据透视表和 N 维立方体) 和时间序列转换作为 DocumentDB 中的存储过程

(ii)最近 cosmosdb 支持此功能,您可以通过预览功能 Pane 启用此功能并打开 MongoDB 聚合管道。请点击以下链接,

Aggregation in cosmos-db

https://stackoverflow.com/questions/41338931/

相关文章:

mongodb - 如何在 $lookup Mongodb 的 LocalField 中将字符串转换

javascript - 使用 Nodejs 在 mongodb 中存储文件

java - Spring数据mongo在Query中使用OR

spring - 使用 Spring 数据 MongoDB @Document 创建一个上限集合

mongodb - 为什么直接搜索 MongoDB 分片的全文搜索比通过集群管理器 (mongos)

mongodb - 如何在复杂的 Collection-Object 中附加新文档

regex - Mongo 正则表达式搜索的索引范围

mongodb - 如何从 Mongoose 中的对象 ID 获取创建日期?

php - 如何单击表条目并在另一个 mongodb 集合(php/jquery)中搜索它

mongodb - 可以在 MongoDB 查询中使用严格的 JSON $dates 吗?