Open psam44 opened 3 months ago
The single update() operation is not affected because its code is different.
The bug is at /lib/service/storage/elasticsearch.ts#L3120, _processExtract():
_source: Object.assign({}, metadata, document.body),
The metadata content is correct, but assign() states that "Later sources' properties overwrite earlier ones.", and document.body has already these properties, with null values. I got the expected behaviour with this hack in the distributed js:
_source: Object.assign({}, document.body, metadata),
I didn't investigate on the two other assign() usages in this file, but they probably have a similar defect.
Kuzzle version: master Node.js version: SDK version:
Thank you for reporting this issue, we will have a look into into it.
If you have the time to do it PRs are welcomed
The single update() operation is not affected because its code is different.
The bug is at /lib/service/storage/elasticsearch.ts#L3120, _processExtract():
The metadata content is correct, but assign() states that "Later sources' properties overwrite earlier ones.", and document.body has already these properties, with null values. I got the expected behaviour with this hack in the distributed js:
I didn't investigate on the two other assign() usages in this file, but they probably have a similar defect.
Context (Environment)
Kuzzle version: master Node.js version: SDK version: