【问题】
Hi,
i am trying to use mongodb aggregate query using $setUnion, $project and also $group to group the documents. The structure of document is
{
“_id” : ObjectId(“55014006e4b0333c9531043e”),
“acls” : {
“append” : {
“users” : [ObjectId(“54f5bfb0336a15084785c393”) ],
“groups” : [ ]
},
“edit” : {
“groups” : [ ],
“users” : [
ObjectId(“54f5bfb0336a15084785c392”)
]
},
“fullControl” : {
“users” : [ ],
“groups” : [ ]
},
“read” : {
“users” : [ObjectId(“54f5bfb0336a15084785c392”), ObjectId(“54f5bfb0336a15084785c398”)],
“groups” : [ ]
}
},
name: “ABC”
}
{
“_id” : ObjectId(“55014006e4b0333c9531043f”),
“acls” : {
“append” : {
“users” : [ObjectId(“54f5bfb0336a15084785c365”) ],
“groups” : [ ]
},
“edit” : {
“groups” : [ ],
“users” : [
ObjectId(“54f5bfb0336a15084785c392”)
]
},
“fullContr