Details
-
Improvement
-
Resolution: Fixed
-
Major - P3
-
None
-
None
Description
Description
Currently, $unionWith outputs documents in a predictable order. But it's not guaranteed: users should assume that $unionWith can output documents in any order.
The page for $unionWith doesn't mention ordering one way or the other. It would be good to explicitly warn people that the order is not guaranteed. (We've done this for other operators, like $addToSet.)
The Versioned API Scope talks about why we don't want to promise the output order will stay predictable: it leaves the door open for us to optimize it better in the future.