Skip to content

Commit d66f8a0

Browse files
Documentation fix: Types are in the process of being removed.
Original Pull Request: #1754
1 parent dfc68cd commit d66f8a0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: src/main/asciidoc/reference/elasticsearch-clients.adoc

+3-2
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,12 @@ public class RestClientConfig extends AbstractElasticsearchConfiguration {
8585
8686
// ...
8787
88-
IndexRequest request = new IndexRequest("spring-data", "elasticsearch", randomID())
88+
IndexRequest request = new IndexRequest("spring-data")
89+
.id(randomID())
8990
.source(singletonMap("feature", "high-level-rest-client"))
9091
.setRefreshPolicy(IMMEDIATE);
9192
92-
IndexResponse response = highLevelClient.index(request);
93+
IndexResponse response = highLevelClient.index(request,RequestOptions.DEFAULT);
9394
----
9495
<1> Use the builder to provide cluster addresses, set default `HttpHeaders` or enable SSL.
9596
<2> Create the RestHighLevelClient.

0 commit comments

Comments
 (0)