Documentation fix: Types are in the process of being removed.

Original Pull Request: #1754
This commit is contained in:
Rahul Lokurte 2021-04-03 11:55:54 +05:30 committed by GitHub
parent dfc68cd33b
commit d66f8a0650
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.