From 2f84be7a5bb1d72f16e5f47cebdd932d5eec6977 Mon Sep 17 00:00:00 2001 From: imcaizheng Date: Thu, 4 Feb 2021 16:27:57 +0800 Subject: [PATCH] ndex Data Script: Include the `id` field inside the body of a document --- src/common/helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/helper.js b/src/common/helper.js index c7673c0f..d30357e5 100644 --- a/src/common/helper.js +++ b/src/common/helper.js @@ -276,7 +276,7 @@ async function indexDataToEsById (id, modelName, indexName, logger) { await esClient.index({ index: indexName, id: id, - body: _.omit(data.dataValues, 'id') + body: data.dataValues }) logger.info({ component: 'indexDataToEsById', message: 'Indexing complete!' }) }