-
Type: Improvement
-
Resolution: Won't Do
-
Priority: Minor - P4
-
Affects Version/s: None
-
Labels:
-
0.2
Description
I was reading this page:
https://docs.mongodb.com/manual/reference/operator/update/sort/
and wanted to know if $sort was stable or not. Unfortunately for me, this information is not on the page. Specifically, I wanted to see either:
"$sort executes a stable sort; if two items in the array are being sorted on the same field, and they have the same value for that field, the earlier item will still be earlier after the sort is done."
Or:
"$sort is not guaranteed to be stable. If two items in the array are being sorted on a field, and they have the same value for that field, their relative positions in the array might be different after the sort is complete."
Please include this information in the documentation! Unfortunately I still don't know the answer to the question, so you'll have to investigate whether $sort is supposed to be stable or not.