-
Type:
Bug
-
Resolution: Works as Designed
-
Priority:
Major - P3
-
None
-
Affects Version/s: 8.0.11
-
Component/s: None
-
Server Triage
-
ALL
-
- create a empty collection in mongoDb 8 and insert attached documents json which has only _id.
- sort on non present field like { order: 1 }
- return order is messed up and random
-
None
-
3
-
TBD
-
None
-
None
-
None
-
None
-
None
-
None
-
None
When using the find query with sort on a field that does not exist on any document, Previous behaviour in mongoDb 6 and 7 was it falls back to sorting by _id or maintains natural order.
In mongoDb 8, without any sort it maintains natural order but on giving sort on a field that is not present in any document, it messes by the sorting order and gives a randomly sorted list.