📅  最后修改于: 2022-03-11 15:03:59.688000             🧑  作者: Mango
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)
}
});