我的查询是......
aggregate[{
$lookup: {
"from": "replacement_articles",
"localField": "_id",
"foreignField": "userid",
"as": "replacement_articles"
}
},
{
$unwind: "$replacement_articles"
},
{
_id: "$id",
article_count: { "$push": { "$size": "replacement_articles" } }
}
]
MongoError:$ size的参数必须是数组,但类型为:missing