Fuzzy Searching with Mongodb?
I believe that to do “fuzzy” search you will need to use regex. This should accomplish what you’re looking for (escapeRegex function source here): function escapeRegex(text) { return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, “\\$&”); }; router.get(“https://stackoverflow.com/”, function(req, res) { if (req.query.search) { const regex = new RegExp(escapeRegex(req.query.search), ‘gi’); Jobs.find({ “name”: regex }, function(err, foundjobs) { if(err) { console.log(err); } … Read more