Category "mongoose"

Fuzzy Searching with Mongodb?

I have managed to set up a search feature in my mongodb app. See the code below. This works very well however it only returns exact results. How would I change

How to Insert documents to multiple collection in a single query using nodejs

I am trying to insert documents into multiple collections by writing single query. Let consider that I have two collections person and address. I want insert d

How can I use partialFilterExpression on a mongoose model

I have created a mongoose model that has an email field. I want it to be unique if a value is provided by a user but I want it to be empty is a user has not pro

Mongoose: extending schemas

Currently I have two almost identical schemas: var userSchema = mongoose.Schema({ email: {type: String, unique: true, required: true, validate: emailValid