I am suggesting a way to sort by the elements not just some part of them ({$sort:{"field":order}}).
One possible syntax would be:
{$push:{$each:[...], $sort:-1}}// sort whole element, desc.
- depends on
-
DRIVERS-121 support new update operators
- Closed
- related to
-
SERVER-8069 Support full $slice / $sort semantics in $push
- Closed