Mongoosastic – 将ObjectId索引到弹性search中
索引到Elastic Search时,我想索引我的mongoDB objectID
喜欢这个 :
_id : {type: mongoose.Schema.Types.ObjectId, es_indexed:true}, parentItem : {type: mongoose.Schema.Types.ObjectId, Ref:'SystemItem', es_indexed:true }
当mongoosastic将我的数据库导入到弹性search时,这产生undefined
有办法做到这一点? 或者我应该走另一条路?