My model was,
var userSchema = new Schema({ first_name : String, last_name : String, ... });
From this, I need to do search fil
User.findOne({ $or: [ {first_name: name}, {last_name: name}, ], }, function(err, user) { ... })
Use find if you expect there to be more than one document matching name to be equal to first_name or last_name.
find