You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Weijie Guo (Jira)" <ji...@apache.org> on 2025/03/18 09:50:05 UTC

[jira] [Updated] (FLINK-28109) Delete useful code in the row emitter.

     [ https://issues.apache.org/jira/browse/FLINK-28109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Weijie Guo updated FLINK-28109:
-------------------------------
    Affects Version/s: 2.1.0
                           (was: 1.15.0)

> Delete useful code in the row emitter.
> --------------------------------------
>
>                 Key: FLINK-28109
>                 URL: https://issues.apache.org/jira/browse/FLINK-28109
>             Project: Flink
>          Issue Type: Improvement
>          Components: Connectors / ElasticSearch
>    Affects Versions: 2.1.0
>            Reporter: Luning Wang
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.0.0
>
>
>  
> The `.id(key)` in the RowElasticsearchEmitter make users get confused.
> The following is the source code. key always null, we can never call the `id` method.
> {code:java}
> if (key != null) {
>     final UpdateRequest updateRequest =
>             new UpdateRequest(indexGenerator.generate(row), documentType, key)
>                     .doc(document, contentType)
>                     .upsert(document, contentType);
>     indexer.add(updateRequest);
> } else {
>     final IndexRequest indexRequest =
>             new IndexRequest(indexGenerator.generate(row), documentType)
>                     .id(key)
>                     .source(document, contentType);
>     indexer.add(indexRequest);
> }{code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)