📜  node js mongoose 文本索引 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:14.530000             🧑  作者: Mango

代码示例2
var schema = new Schema({
  name: String,
  email: String,
  profile: {
    something: String,
    somethingElse: String
  }
});
schema.index({name: 'text', 'profile.something': 'text'});