From d66f8a0650ea8dd9551499c57fbf70f7f25e641d Mon Sep 17 00:00:00 2001 From: Rahul Lokurte <81438015+rahulmlokurte@users.noreply.github.com> Date: Sat, 3 Apr 2021 11:55:54 +0530 Subject: [PATCH] Documentation fix: Types are in the process of being removed. Original Pull Request: #1754 --- src/main/asciidoc/reference/elasticsearch-clients.adoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/asciidoc/reference/elasticsearch-clients.adoc b/src/main/asciidoc/reference/elasticsearch-clients.adoc index 62f5a23f8..974bbf3cd 100644 --- a/src/main/asciidoc/reference/elasticsearch-clients.adoc +++ b/src/main/asciidoc/reference/elasticsearch-clients.adoc @@ -85,11 +85,12 @@ public class RestClientConfig extends AbstractElasticsearchConfiguration { // ... -IndexRequest request = new IndexRequest("spring-data", "elasticsearch", randomID()) +IndexRequest request = new IndexRequest("spring-data") + .id(randomID()) .source(singletonMap("feature", "high-level-rest-client")) .setRefreshPolicy(IMMEDIATE); -IndexResponse response = highLevelClient.index(request); +IndexResponse response = highLevelClient.index(request,RequestOptions.DEFAULT); ---- <1> Use the builder to provide cluster addresses, set default `HttpHeaders` or enable SSL. <2> Create the RestHighLevelClient.