You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/05/02 11:35:03 UTC

[GitHub] [beam] hermes85pl commented on a change in pull request #10433: [BEAM-5192] Add support for Elasticsearch v7 in ElasticsearchIO

hermes85pl commented on a change in pull request #10433:
URL: https://github.com/apache/beam/pull/10433#discussion_r418947649



##########
File path: sdks/java/io/elasticsearch/src/main/java/org/apache/beam/sdk/io/elasticsearch/ElasticsearchIO.java
##########
@@ -1317,8 +1341,10 @@ private String getDocumentMetadata(String document) throws IOException {
                   spec.getTypeFn() != null ? spec.getTypeFn().apply(parsedDocument) : null,
                   spec.getIdFn() != null ? spec.getIdFn().apply(parsedDocument) : null,
                   spec.getUsePartialUpdate() ? DEFAULT_RETRY_ON_CONFLICT : null);
+          SimpleModule module = new SimpleModule();
+          module.addSerializer(DocumentMetadata.class, new DocumentMetadataSerializer());
+          OBJECT_MAPPER.registerModule(module);

Review comment:
       I can see that it is merged already. LGTM too. Thanks!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org