-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Environment:OS: macOS 14.2
node.js / npm versions:
Additional info:
-
2
-
Not Needed
-
Iteration Fortitudo
Problem Statement/Rationale
db.createCollection("special", { collation: { locale: "de", strength: 1 } }) db.special.insert({ _id: "yes" }) // This returns empty, as it should: db.special.find({_id:"yës"}, null, {collation: { locale: "simple" } })
… then do an explain on that:
db.special.explain().find({_id:"yës"}, null, {collation: { locale: "simple" } }) { queryPlanner: { plannerVersion: 1, namespace: 'test.special', indexFilterSet: false, parsedQuery: { _id: { '$eq': 'yës' } }, collation: { locale: 'de', caseLevel: false, caseFirst: 'off', strength: 1, numericOrdering: false, alternate: 'non-ignorable', maxVariable: 'punct', normalization: false, backwards: false, version: '57.1' }, ...
Note the “locale: 'de'” in the above. It should instead honor the collation given in the request.
This seems likely related to NODE-5510, where the node.js driver quietly drops parts of the request.
Steps to Reproduce
See above.
Expected Results
The explain() should reflect simple collation.
Actual Results
The explain() shows the same result as if I didn’t specify collation at all.
- is related to
-
NODE-5510 Do not silently filter out $changeStream stage options when building a change stream cursor via the watch() API
- Backlog