我当前正在使用第一个运算符。是否有操作员来提取所有文档?
q = col.aggregate([{'$group' : {'_id' :
{'DESIGN':"$CURRENT_DESIGNATION","count":{"$sum":1}},
"NAME":{"$first":"$NAME"},
"CURRENT_LOCATION":{"$first":"$CURRENT_LOCATION"},
"CURRENT_DESIGNATION":
{"$first":"$CURRENT_DESIGNATION"},
"PROFILE_URL":{"$first":"$PROFILE_URL"}}}])
for i in q:
pprint(i)
答案 0 :(得分:0)