当我尝试使用地理空间条件聚合结果时遇到问题:
db.users.group({
reduce: function(obj, prev) {
prev.sums = {
y_levels: prev.sums.y_levels + obj.current_y_level,
x_levels: prev.sums.x_levels + obj.current_x_level,
count: prev.sums.count + 1
}
},
cond: {current_position: { $near: [56.553823, 8.565619, 10]}},
initial: { sums: { y_levels: 0, x_levels: 0, count: 0 } }
});
产生:
uncaught exception: group command failed: {
"errmsg" : "exception: manual matcher config not allowed",
"code" : 13285,
"ok" : 0
我对“常规”条件没有任何问题。
任何想法?