1
我们有一个mongoose对象,其模式如下,使用timestamps,我们正在填充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做到这一点。请让我知道这些具体的选项来完成这个。
你是如何索引文件?你用什么来索引? – hkulekci