From 6c3c8398d019fc8031e140ee3ecbb94fb4856483 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 9 Aug 2023 17:06:46 +0100 Subject: [PATCH] Upgrade to Elasticsearch Client 8.9.0 Closes gh-36886 --- .../elasticsearch/ElasticsearchClientConfigurations.java | 6 +++--- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- .../spring-boot-docs/src/docs/asciidoc/data/nosql.adoc | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchClientConfigurations.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchClientConfigurations.java index 28197797567..de1fd52b083 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchClientConfigurations.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchClientConfigurations.java @@ -22,7 +22,7 @@ import co.elastic.clients.json.SimpleJsonpMapper; import co.elastic.clients.json.jackson.JacksonJsonpMapper; import co.elastic.clients.json.jsonb.JsonbJsonpMapper; import co.elastic.clients.transport.ElasticsearchTransport; -import co.elastic.clients.transport.TransportOptions; +import co.elastic.clients.transport.rest_client.RestClientOptions; import co.elastic.clients.transport.rest_client.RestClientTransport; import com.fasterxml.jackson.databind.ObjectMapper; import jakarta.json.bind.Jsonb; @@ -90,8 +90,8 @@ class ElasticsearchClientConfigurations { @Bean RestClientTransport restClientTransport(RestClient restClient, JsonpMapper jsonMapper, - ObjectProvider transportOptions) { - return new RestClientTransport(restClient, jsonMapper, transportOptions.getIfAvailable()); + ObjectProvider restClientOptions) { + return new RestClientTransport(restClient, jsonMapper, restClientOptions.getIfAvailable()); } } diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index eb879d95602..d0abfbd49fa 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -262,7 +262,7 @@ bom { ] } } - library("Elasticsearch Client", "8.8.2") { + library("Elasticsearch Client", "8.9.0") { group("org.elasticsearch.client") { modules = [ "elasticsearch-rest-client" { diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/data/nosql.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/data/nosql.adoc index b2846fe4934..b49028f9e95 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/data/nosql.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/data/nosql.adoc @@ -330,7 +330,7 @@ If you have `co.elastic.clients:elasticsearch-java` on the classpath, Spring Boo The `ElasticsearchClient` uses a transport that depends upon the previously described `RestClient`. Therefore, the properties described previously can be used to configure the `ElasticsearchClient`. -Furthermore, you can define a `TransportOptions` bean to take further control of the behavior of the transport. +Furthermore, you can define a `RestClientOptions` bean to take further control of the behavior of the transport. @@ -341,7 +341,7 @@ If you have Spring Data Elasticsearch and Reactor on the classpath, Spring Boot The `ReactiveElasticsearchclient` uses a transport that depends upon the previously described `RestClient`. Therefore, the properties described previously can be used to configure the `ReactiveElasticsearchClient`. -Furthermore, you can define a `TransportOptions` bean to take further control of the behavior of the transport. +Furthermore, you can define a `RestClientOptions` bean to take further control of the behavior of the transport.