We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfc68cd commit d66f8a0Copy full SHA for d66f8a0
src/main/asciidoc/reference/elasticsearch-clients.adoc
@@ -85,11 +85,12 @@ public class RestClientConfig extends AbstractElasticsearchConfiguration {
85
86
// ...
87
88
-IndexRequest request = new IndexRequest("spring-data", "elasticsearch", randomID())
+IndexRequest request = new IndexRequest("spring-data")
89
+ .id(randomID())
90
.source(singletonMap("feature", "high-level-rest-client"))
91
.setRefreshPolicy(IMMEDIATE);
92
-IndexResponse response = highLevelClient.index(request);
93
+IndexResponse response = highLevelClient.index(request,RequestOptions.DEFAULT);
94
----
95
<1> Use the builder to provide cluster addresses, set default `HttpHeaders` or enable SSL.
96
<2> Create the RestHighLevelClient.
0 commit comments