mongoosastic npm モジュールを使用しています。インデックスを切り捨てている間、私は取得しています
TypeError: Unable to build a path with those params. Supply at least index
私が使用しているコード
Truncate の場合:
var tagModelJS = require('../DaoModel/TagModel.js');
var TagModel = tagModelJS.getTagModel();
TagModel.esTruncate(function (err) {
if (err) {
console.log("ERROR : while removing data from elastic search.")
throw err;
}
});
タグモデル:
var TAGS;
module.exports = {
createSchemaAndGetModel : function (mongoose, mongoosastic, Schema) {
//create schema
var tagSchema = new Schema({
tagDetail : String,
userIds : [], //list of user ids
tagName : {
type : [String],
es_indexed : true
} // field level
});
tagSchema.plugin(mongoosastic)
//create model
TAGS = mongoose.model('TAGS', tagSchema);
console.log("Tag model ready....");
},
getTagModel : function () {
return TAGS;
}
};
どんな助けでも大歓迎です。