【发布时间】:2012-11-21 15:54:08
【问题描述】:
我在我的代码中调用 MongoDB 聚合函数为:
AggregationOutput output = collection.aggregate( matchUserID, unwindF, matchFUsers,projection);
我已经在我的本地主机中测试了我的代码,它运行良好。当我在另一个数据库(2.2.1 版)中使用相同的数据库时,会出现此错误:
com.mongodb.CommandResult$CommandFailure: command failed [aggregate]: { "serverUsed" : "<server address>" , "errmsg" : "no such cmd: aggregate" , "bad cmd" : { "aggregate" : .... }
有什么线索吗?
【问题讨论】:
标签: mongodb mongodb-query mongodb-java