Answers for "mongodb search contains text"

1

contains mongo-query string

db.users.findOne({"username" : {$regex : ".*son.*"}});
Posted by: Guest on October-21-2020
1

mongodb text search exact match

Model.find({
  $text: {
  	$search: `"exact_match"`
  }
})
Posted by: Guest on February-16-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language