先通过mongo中的聚合函数:group()后返回的是DBObject 对象,我想将其存入另一个集合中,怎么办???
Later, I figured it out myself, just put it directly into a document and insert it into the collection. .
collection.aggregate([ { '$match': {} }, { '$group': {} } ], { out: 'OtherCollection' })
Requires MongoDB 2.6+ And every time you go out, the previous data will be erased If you don’t want it to be erased, insert the structures into a new collection in batches
Later, I figured it out myself, just put it directly into a document and insert it into the collection. .
Requires MongoDB 2.6+
And every time you go out, the previous data will be erased
If you don’t want it to be erased, insert the structures into a new collection in batches