Hello. Worth Monga, version 3.4.
There are collections of children and parents.
Each document from parents belongs to one of the children, that is
name: 'test', parent: ObjectID('xxxxxxxxxxxxxxxxxxxxxxxx') There are about 5000 documents in the orders collection, and when I try to get them, I get an error that you cannot use the aggregate in a collection larger than 16 megabytes.
The question is how do I get all the documents by writing down the user name from the users collection (only the name, not the whole document)
Current request:
DB.children.aggregate([ { $lookup: { from: 'parents', localField: 'parent', foreignField: '_id', as: 'parentFull' // ΠΏΠΎΠ»Π½ΡΠΉ Π΄ΠΎΠΊ, Π° Ρ
ΠΎΡΡ ΡΠΎΠ»ΡΠΊΠΎ ΠΈΠΌΡ } } ]); Error text
{"name":"MongoError","message":"aggregation result exceeds maximum document size (16MB)","ok":0,"errmsg":"aggregation result exceeds maximum document size (16MB)","code":16389,"codeName":"Location16389"}