Hello,
I want to add text indexes to a collection I call users, but Id like to add that index to several fields, how would I do with mongoose models
Im doing the following:
userSchema.index({ name: "text" }, { weight: 5});
userSchema.index({ name: "email" }, { weight: 2});
userSchema.index({ username: "text" }, { weight: 10});
but it only creates the name text index.
What am I missing?
Thank you