Closed i-rebel-aj closed 3 years ago
I have aggregated my collection such that, I am generating documents with _id being the grouping condition and I am pushing all the documents that fall into this group in an array. So my final output is like:
_id
{_id: 'Student Class1', studentsInThisClass:[ ... ]}, {_id: 'Student Class2', studentsInThisClass:[ ... ]}, ...
Can I paginate solely on the basis of groups.. my expected output Groups themselves might be paginated too
{_id:'Student Class 1', docs:[ .... ]} , {_id:'Student Class 2', docs:[ .... ]} ,
Is it currently supported?
If my final step in aggregation pipeline is
'$group': { '_id': '$student.class', 'classInfo': { '$push': '$$ROOT' } }
@i-rebel-aj Sorry that is not supported.
I have aggregated my collection such that, I am generating documents with
_id
being the grouping condition and I am pushing all the documents that fall into this group in an array. So my final output is like:Can I paginate solely on the basis of groups.. my expected output Groups themselves might be paginated too
Is it currently supported?
If my final step in aggregation pipeline is