Fuzzy search using mongoose from vue client
Add $regex to the whitelist option of the Mongoose service:
app.use('/messages', service({ Model, whitelist: [ '$regex' ]}));
try this
// regex to find records that start with letter any name , example "e" Model.aggregate([ { $match: { field_name: { $regex: "^" + searchName, $options: "i" } } }]).exec(function(err, result) { if (err) { // handle here } if (result) { // do something } }