You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Evan Galpin (Jira)" <ji...@apache.org> on 2021/10/20 19:41:00 UTC

[jira] [Commented] (BEAM-11276) Write with custom indexName and docId not present in document itself

    [ https://issues.apache.org/jira/browse/BEAM-11276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17431439#comment-17431439 ] 

Evan Galpin commented on BEAM-11276:
------------------------------------

[~lionelsetan] I think the advised approach would be to place that data in a field in the document body upstream in your pipeline. This should work for all cases except where an ES index mapping is configured with `dynamic: strict`; in all other cases, an unmapped field should not cause issues in ES but will allow for the functionality that you mention.

> Write with custom indexName and docId not present in document itself
> --------------------------------------------------------------------
>
>                 Key: BEAM-11276
>                 URL: https://issues.apache.org/jira/browse/BEAM-11276
>             Project: Beam
>          Issue Type: Wish
>          Components: io-java-elasticsearch
>    Affects Versions: 2.25.0
>         Environment: Java, Google Dataflow
>            Reporter: Lionel Setan
>            Priority: P3
>
> ElasticIO connector write method is taking currently as input a "PCollection<String>" element ; string value will be passed as ElasticSearch document body. With methods withIdFn, and withIndexFn, we can overload Elastic document id and index name at runtime.
> There is some kind of situation where indexName and/or docId are not present in document itself (for example from Google Pubsub metadata or other).
> Is there a way to implement this usecase with current ElasticIO ? Otherwise, if it makes sense for you, what kind of improvment can be performed on connector ?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)