我们有一个具有如下模式的猫鼬对象,使用 时间戳,我们正在填充 createdAt 和 updatedAt 字段。我们正在使用mongoosastic在弹性搜索中对这些进行索引。
var mongoose = require("mongoose");
var employeeSchema = new mongoose.Schema(
{
name: {
type: String
es_indexed: true,
es_index:"analyzed"
},
managerId: {type: mongoose.Schema.Types.ObjectId},
details:{},
email: {
type: String
es_indexed: true,
es_index:"analyzed"
},
phone: {
type: Number
es_indexed: true,
es_index:"analyzed"
}
},
{
timestamps: true
});
我也想updatedAt
在弹性搜索中建立索引,但不知道如何使用 mongoosastic。请让我知道这些特定的选项可以完成这项工作。