Node.js 基于关键字的mongoose节点搜索
const UserSchema=new mongoose.Schema({ 名称:String, 项目名称:String }); const User=new mongoose.model(“User”,UserSchema)Node.js 基于关键字的mongoose节点搜索,node.js,mongodb,mongoose,Node.js,Mongodb,Mongoose,const UserSchema=new mongoose.Schema({ 名称:String, 项目名称:String }); const User=new mongoose.model(“User”,UserSchema) 搜寻 搜寻 您可以使用正则表达式模式进行模糊搜索,如下所示 User.find({project_name : /your-search-keyword-variable-here/}) 使用正则表达式搜索API这是否回答了您的问题?
搜寻
搜寻
您可以使用正则表达式模式进行模糊搜索,如下所示
User.find({project_name : /your-search-keyword-variable-here/})
使用正则表达式搜索API这是否回答了您的问题?