Hi Everybody,
I just started having this weird issue with my db.createCollection
calls. The collation I am using is valid. I am not using the listCollections
though the createCollection
method likely does. I am using the following call:
db.createCollection(collectionName, {
collation: {
locale: 'en_US',
strength: 2
}
});
MongoError: BSON field 'listCollections.collation' is an unknown field.
at MessageStream.messageHandler (C:\projectsjs\fourmatic\node_modules\mongodb\lib\cmap\connection.js:261:20)
at MessageStream.emit (events.js:209:13)
at MessageStream.EventEmitter.emit (domain.js:476:20)
at processIncomingData (C:\projectsjs\fourmatic\node_modules\mongodb\lib\cmap\message_stream.js:144:12)
at MessageStream._write (C:\projectsjs\fourmatic\node_modules\mongodb\lib\cmap\message_stream.js:42:5)
at doWrite (_stream_writable.js:428:12)
at writeOrBuffer (_stream_writable.js:412:5)
at MessageStream.Writable.write (_stream_writable.js:302:11)
at TLSSocket.ondata (_stream_readable.js:722:22)
at TLSSocket.emit (events.js:209:13) {
ok: 0,
code: 40415,
codeName: 'Location40415',
'$clusterTime': {
clusterTime: Timestamp { _bsontype: 'Timestamp', low_: 3, high_: 1647996433 },
signature: { hash: [Binary], keyId: [Long] }
},
operationTime: Timestamp { _bsontype: 'Timestamp', low_: 3, high_: 1647996433 },
name: 'MongoError'
}
What could be causing this issue?