📌  相关文章
📜  "errmsg" : "管道阶段规范对象必须包含一个字段.", - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:36.127000             🧑  作者: Mango

代码示例1
// true
db.audiofiles.aggregate([
    {
        "$match": {
            "privacy": { "$ne": "same" },
            "date": { "$eq": "2017/04/25" },
            "deleted": 0
        }
    },
    {
        "$group": { 
            "_id": "$to_email", 
            "count": { "$sum": 1 }
        }
    }
]);

// false
db.audiofiles.aggregate([{
    "$match": {
      "privacy": { "$ne": "same" },
      "date": { "$eq": "2017/04/25" },
      "deleted": 0
     },
    "$group": { 
      "_id": "$to_email", 
      "count": { "$sum": 1 }
    }
}]);