Zhang Hechuan created FLINK-37265:
-------------------------------------

             Summary: document of python elasticsearch connector exeample has a 
mistake
                 Key: FLINK-37265
                 URL: https://issues.apache.org/jira/browse/FLINK-37265
             Project: Flink
          Issue Type: Bug
          Components: API / DataStream, API / Python, Connectors / ElasticSearch
    Affects Versions: 1.20.0, 1.19.0, 1.18.0, 1.17.0
            Reporter: Zhang Hechuan


Elasticsearch 7 static index:
{code:java}
//代码占位符 
from pyflink.datastream.connectors.elasticsearch import 
Elasticsearch7SinkBuilder, ElasticsearchEmitter

env = StreamExecutionEnvironment.get_execution_environment()
env.add_jars(ELASTICSEARCH_SQL_CONNECTOR_PATH)

input = ...

# The set_bulk_flush_max_actions instructs the sink to emit after every 
element, otherwise they would be buffered
es7_sink = Elasticsearch7SinkBuilder() \
    .set_bulk_flush_max_actions(1) \
    .set_emitter(ElasticsearchEmitter.static('foo', 'id')) \
    .set_hosts(['localhost:9200']) \
    .build()

input.sink_to(es7_sink).name('es7 sink')


"ElasticsearchEmitter" has not method named "static", it should be 
"static_index"{code}



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

Reply via email to