-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
confirmed-bugWe've confirmed this is a bug in Mongoose and will fix it.We've confirmed this is a bug in Mongoose and will fix it.
Milestone
Description
var UserSchema = mongoose.Schema({
firstName: {type: String, index: true}
},{autoIndex : true, collation: { locale: 'en' }});
db.user.getIndexes();
{
"v" : 2,
"key" : {
"firstName" : 1
},
"name" : "firstName_1",
"ns" : "db.user",
"background" : true
},
There is no en
collation on the index created by autoIndex . I may write a startup script to perform the autoIndex function with the collation options set on the Schema. Mongoose ignores the Schema collation when autoIndex creates an index (uses collection default collation instead).
Seems related to this other issue: #7621
Metadata
Metadata
Assignees
Labels
confirmed-bugWe've confirmed this is a bug in Mongoose and will fix it.We've confirmed this is a bug in Mongoose and will fix it.