Github user twalthr commented on a diff in the pull request: https://github.com/apache/flink/pull/6391#discussion_r204750192 --- Diff: docs/dev/connectors/elasticsearch.md --- @@ -138,6 +143,31 @@ input.addSink(new ElasticsearchSink<>(config, transportAddresses, new Elasticsea } }));{% endhighlight %} </div> +<div data-lang="java, Elasticsearch 6.x" markdown="1"> +{% highlight java %} +DataStream<String> input = ...; + +List<HttpHost> httpHost = new ArrayList<>(); +httpHosts.add(new HttpHost("127.0.0.1", 9200, "http")); +httpHosts.add(new HttpHost("10.2.3.1", 9200, "http")); + +input.addSink(new ElasticsearchSink<>(httpHosts, new ElasticsearchSinkFunction<String>() { --- End diff -- Add an example for the user config as well to be in sync with the examples of other versions? Because the following paragraph mentions: > Especially important is the `cluster.name` parameter Btw could you also add imports to your examples. I just started to do this with my code examples to make it easier for people to find the used classes (see [here](https://ci.apache.org/projects/flink/flink-docs-master/dev/java_lambdas.html))
---