elasticsearch ElasticSearch截断索引类型错误,elasticsearch,mongoose,mongoosastic,elasticsearch,Mongoose,Mongoosastic" /> elasticsearch ElasticSearch截断索引类型错误,elasticsearch,mongoose,mongoosastic,elasticsearch,Mongoose,Mongoosastic" />

elasticsearch ElasticSearch截断索引类型错误

elasticsearch ElasticSearch截断索引类型错误,elasticsearch,mongoose,mongoosastic,elasticsearch,Mongoose,Mongoosastic,我正在使用Mongoostic npm模块。在截断索引时,我得到 TypeError: Unable to build a path with those params. Supply at least index 我正在使用的代码 对于截断: var tagModelJS = require('../DaoModel/TagModel.js'); var TagModel = tagModelJS.getTagModel(); TagModel.esTruncate(function (e

我正在使用Mongoostic npm模块。在截断索引时,我得到

TypeError: Unable to build a path with those params. Supply at least index
我正在使用的代码

对于截断:

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;
        }
       };
任何帮助都将不胜感激