Skip to content

Commit b555891

Browse files
authored
Merge pull request #131 from imcaizheng/include-id-field-when-index
Include the `id` field inside a document when index
2 parents cceef5d + 2f84be7 commit b555891

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common/helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ async function indexDataToEsById (id, modelName, indexName, logger) {
276276
await esClient.index({
277277
index: indexName,
278278
id: id,
279-
body: _.omit(data.dataValues, 'id')
279+
body: data.dataValues
280280
})
281281
logger.info({ component: 'indexDataToEsById', message: 'Indexing complete!' })
282282
}

0 commit comments

Comments
 (0)