Details
-
Bug
-
Resolution: Works as Designed
-
Major - P3
-
None
-
1.4.6
-
None
Description
I write a sample test on: https://github.com/GaoJianAllen/MongoTest
When use sort method to sort fields, it will return wrong sort result sometime.
Key code:
cursor, err := coll.Find(context.TODO(), bson.M{}, options.Find().SetSort(
|
bson.M{"type": 1, "created": -1})) |
Expect:

Actual(Sometimes):

Command is always correct.
db.coll.find().sort({"type": 1, "created_at":-1}) |