考虑一下 MongoDB 中的以下posts集合:
{ "_id" : 1,
"post_title" : "this is post title",
"tags": [ "social", "friends", "books"],
// rest of the document
}
以下查询的输出结果是什么?( )
db.posts.aggregate( [ { $unwind : "$tags" } ] )
为三个不同的标签交回三份不同的文件
按升序排列标签(wind)
按降序排列标签(wind)
返回一个文档,但将标记数组转换为一个对象