📜  mongoosastic 更新索引 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:59.688000             🧑  作者: Mango

代码示例1
MovieSchema.findOneAndUpdate(query, reqObject, {
        upsert: true,'new': true
    }, function(err, results) {
        if (err) {
            console.log(err)
            return;
        } else {
            console.log("Data updated in ElasticSearch & MongoDB")
            console.log(results)
        }
    });