From 2515d8ee09c3e003b3dceeebd15588191de4b513 Mon Sep 17 00:00:00 2001 From: Peter-Josef Meisch Date: Mon, 31 Mar 2025 09:03:39 +0200 Subject: [PATCH] Upgrade to Elasticsearch 8.17.4. Signed-off-by: Peter-Josef Meisch --- pom.xml | 2 +- .../pages/elasticsearch/elasticsearch-new.adoc | 2 +- .../ROOT/pages/elasticsearch/versions.adoc | 2 +- .../client/elc/ResponseConverter.java | 2 -- .../core/query/ByQueryResponse.java | 17 ++--------------- .../core/reindex/ReindexResponse.java | 17 ++--------------- .../testcontainers-elasticsearch.properties | 2 +- 7 files changed, 8 insertions(+), 36 deletions(-) diff --git a/pom.xml b/pom.xml index 843be40fc..ef725516b 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ 3.5.0-SNAPSHOT - 8.17.2 + 8.17.4 0.19.0 2.23.1 diff --git a/src/main/antora/modules/ROOT/pages/elasticsearch/elasticsearch-new.adoc b/src/main/antora/modules/ROOT/pages/elasticsearch/elasticsearch-new.adoc index 887dc49de..d8b9fc7e6 100644 --- a/src/main/antora/modules/ROOT/pages/elasticsearch/elasticsearch-new.adoc +++ b/src/main/antora/modules/ROOT/pages/elasticsearch/elasticsearch-new.adoc @@ -4,7 +4,7 @@ [[new-features.5-5-0]] == New in Spring Data Elasticsearch 5.5 -* Upgrade to Elasticsearch 8.17.2. +* Upgrade to Elasticsearch 8.17.4. * Add support for the `@SearchTemplateQuery` annotation on repository methods. * Scripted field properties of type collection can be populated from scripts returning arrays. diff --git a/src/main/antora/modules/ROOT/pages/elasticsearch/versions.adoc b/src/main/antora/modules/ROOT/pages/elasticsearch/versions.adoc index 7851acaf4..8620ffc8b 100644 --- a/src/main/antora/modules/ROOT/pages/elasticsearch/versions.adoc +++ b/src/main/antora/modules/ROOT/pages/elasticsearch/versions.adoc @@ -6,7 +6,7 @@ The following table shows the Elasticsearch and Spring versions that are used by [cols="^,^,^,^",options="header"] |=== | Spring Data Release Train | Spring Data Elasticsearch | Elasticsearch | Spring Framework -| 2025.0 (in development) | 5.5.x | 8.17.2 | 6.2.x +| 2025.0 (in development) | 5.5.x | 8.17.4 | 6.2.x | 2024.1 | 5.4.x | 8.15.5 | 6.1.x | 2024.0 | 5.3.x | 8.13.4 | 6.1.x | 2023.1 (Vaughan) | 5.2.xfootnote:oom[Out of maintenance] | 8.11.1 | 6.1.x diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/ResponseConverter.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/ResponseConverter.java index 3ae621a20..480c557c1 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/elc/ResponseConverter.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/ResponseConverter.java @@ -400,7 +400,6 @@ public ReindexResponse reindexResponse(co.elastic.clients.elasticsearch.core.Rei private ReindexResponse.Failure reindexResponseFailureOf(BulkIndexByScrollFailure failure) { return ReindexResponse.Failure.builder() // .withIndex(failure.index()) // - .withType(failure.type()) // .withId(failure.id()) // .withStatus(failure.status())// .withErrorCause(toErrorCause(failure.cause())) // @@ -411,7 +410,6 @@ private ReindexResponse.Failure reindexResponseFailureOf(BulkIndexByScrollFailur private ByQueryResponse.Failure byQueryResponseFailureOf(BulkIndexByScrollFailure failure) { return ByQueryResponse.Failure.builder() // .withIndex(failure.index()) // - .withType(failure.type()) // .withId(failure.id()) // .withStatus(failure.status())// .withErrorCause(toErrorCause(failure.cause())).build(); diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/ByQueryResponse.java b/src/main/java/org/springframework/data/elasticsearch/core/query/ByQueryResponse.java index 2cd40cd05..2f0236c85 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/ByQueryResponse.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/ByQueryResponse.java @@ -167,7 +167,6 @@ public static ByQueryResponseBuilder builder() { public static class Failure { @Nullable private final String index; - @Nullable private final String type; @Nullable private final String id; @Nullable private final Exception cause; @Nullable private final Integer status; @@ -176,11 +175,10 @@ public static class Failure { @Nullable private final Boolean aborted; @Nullable private final ElasticsearchErrorCause elasticsearchErrorCause; - private Failure(@Nullable String index, @Nullable String type, @Nullable String id, @Nullable Exception cause, + private Failure(@Nullable String index, @Nullable String id, @Nullable Exception cause, @Nullable Integer status, @Nullable Long seqNo, @Nullable Long term, @Nullable Boolean aborted, @Nullable ElasticsearchErrorCause elasticsearchErrorCause) { this.index = index; - this.type = type; this.id = id; this.cause = cause; this.status = status; @@ -195,11 +193,6 @@ public String getIndex() { return index; } - @Nullable - public String getType() { - return type; - } - @Nullable public String getId() { return id; @@ -250,7 +243,6 @@ public static FailureBuilder builder() { */ public static final class FailureBuilder { @Nullable private String index; - @Nullable private String type; @Nullable private String id; @Nullable private Exception cause; @Nullable private Integer status; @@ -266,11 +258,6 @@ public FailureBuilder withIndex(String index) { return this; } - public FailureBuilder withType(String type) { - this.type = type; - return this; - } - public FailureBuilder withId(String id) { this.id = id; return this; @@ -307,7 +294,7 @@ public FailureBuilder withErrorCause(ElasticsearchErrorCause elasticsearchErrorC } public Failure build() { - return new Failure(index, type, id, cause, status, seqNo, term, aborted, elasticsearchErrorCause); + return new Failure(index, id, cause, status, seqNo, term, aborted, elasticsearchErrorCause); } } } diff --git a/src/main/java/org/springframework/data/elasticsearch/core/reindex/ReindexResponse.java b/src/main/java/org/springframework/data/elasticsearch/core/reindex/ReindexResponse.java index dbb3e8cf4..345a109f7 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/reindex/ReindexResponse.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/reindex/ReindexResponse.java @@ -187,7 +187,6 @@ public static ReindexResponseBuilder builder() { public static class Failure { @Nullable private final String index; - @Nullable private final String type; @Nullable private final String id; @Nullable private final Exception cause; @Nullable private final Integer status; @@ -196,11 +195,10 @@ public static class Failure { @Nullable private final Boolean aborted; @Nullable private final ElasticsearchErrorCause elasticsearchErrorCause; - private Failure(@Nullable String index, @Nullable String type, @Nullable String id, @Nullable Exception cause, + private Failure(@Nullable String index, @Nullable String id, @Nullable Exception cause, @Nullable Integer status, @Nullable Long seqNo, @Nullable Long term, @Nullable Boolean aborted, @Nullable ElasticsearchErrorCause elasticsearchErrorCause) { this.index = index; - this.type = type; this.id = id; this.cause = cause; this.status = status; @@ -215,11 +213,6 @@ public String getIndex() { return index; } - @Nullable - public String getType() { - return type; - } - @Nullable public String getId() { return id; @@ -269,7 +262,6 @@ public static Failure.FailureBuilder builder() { */ public static final class FailureBuilder { @Nullable private String index; - @Nullable private String type; @Nullable private String id; @Nullable private Exception cause; @Nullable private Integer status; @@ -285,11 +277,6 @@ public Failure.FailureBuilder withIndex(String index) { return this; } - public Failure.FailureBuilder withType(String type) { - this.type = type; - return this; - } - public Failure.FailureBuilder withId(String id) { this.id = id; return this; @@ -326,7 +313,7 @@ public Failure.FailureBuilder withErrorCause(@Nullable ElasticsearchErrorCause e } public Failure build() { - return new Failure(index, type, id, cause, status, seqNo, term, aborted, elasticsearchErrorCause); + return new Failure(index, id, cause, status, seqNo, term, aborted, elasticsearchErrorCause); } } } diff --git a/src/test/resources/testcontainers-elasticsearch.properties b/src/test/resources/testcontainers-elasticsearch.properties index 01b3d5e6f..7174db81c 100644 --- a/src/test/resources/testcontainers-elasticsearch.properties +++ b/src/test/resources/testcontainers-elasticsearch.properties @@ -15,7 +15,7 @@ # # sde.testcontainers.image-name=docker.elastic.co/elasticsearch/elasticsearch -sde.testcontainers.image-version=8.17.2 +sde.testcontainers.image-version=8.17.4 # # # needed as we do a DELETE /* at the end of the tests, will be required from 8.0 on, produces a warning since 7.13