在Python中要写成这样:
collection.aggregate([
{"$match": {
"orig_url": {"$ne": "null", "$exists": True},
"doc_type_id": 0,
}},
{"$group": {"_id": "$_id", "count": {"$sum": 1}}}
],
allowDiskUse = True);
在Python中要写成这样:
collection.aggregate([
{"$match": {
"orig_url": {"$ne": "null", "$exists": True},
"doc_type_id": 0,
}},
{"$group": {"_id": "$_id", "count": {"$sum": 1}}}
],
allowDiskUse = True);