📜  猫鼬创建文本索引 - Javascript 代码示例

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

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