Details
-
Improvement
-
Resolution: Won't Fix
-
Major - P3
-
None
-
None
-
None
Description
Currently uses an unordered_set<>. Needs to maintain insert order so a pipeline like this has the original comment order:
db.posts.aggregate(
|
{$unwind: 'comments'},
|
{$match: {'comments.deleted': {$ne: true}}},
|
{$group: {_id: '$_id', comments: {$addToSet: '$comments'}}}
|
);
|