I want to populate other collection by using lookup query but it gives me this error:-
Total size of documents in images-extractions matching pipeline's $lookup stage exceeds 16793600 bytes
My database models look like this:- Images-Extractions Model
{
"_id":ObjectId("610109cce690258166ed9ee1"),
"fileRef":ObjectId("610108e26532080a11417225"),
"imageName":"image 1",
"imageSize":664156,
// other fields
}
File Model:-
{
"_id":ObjectId("610108e26532080a11417225"),
"fileStatus":"ACTIVE",
// other fields
}
I have used this query on file model in aggregation :-
[
{
'$match': {
'_id': ObjectId('610108e26532080a11417225')
}
},
{
'$lookup': {
'from': 'images-extractions',
'as': 'imagesExtractions',
'localField': '_id',
'foreignField': 'fileRef'
}
}
]
And this query gives me the following error:- Total size of documents in images-extractions matching pipeline's $lookup stage exceeds 16793600 bytes
Can anyone help me with this? Please tell me how to fix this. Thanks in advance.