Avoid Aggregate 16MB Limit
问题 I have a collection of about 1M documents. Each document has internalNumber property and I need to get all internalNumber s in my node.js code. Previously I was using db.docs.distinct("internalNumber") or collection.distinct('internalNumber', {}, {},(err, result) => { /* ... */ }) in Node. But with the growth of the collection I started to get the error: distinct is too big, 16m cap . Now I want to use aggregation. It consumes a lot of memory and it is slow, but it is OK since I need to do it