From 14209bf7308d772f440f76289219c3f6c0ef49e1 Mon Sep 17 00:00:00 2001 From: Peter-Josef Meisch Date: Fri, 3 Jul 2026 21:53:58 +0200 Subject: [PATCH] Upgrade Elasticsearch to 9.4.3. Closes #3301 Closes #3298 Signed-off-by: Peter-Josef Meisch --- pom.xml | 4 ++-- .../pages/elasticsearch/elasticsearch-new.adoc | 5 +++++ .../ROOT/pages/elasticsearch/versions.adoc | 1 + .../index/MappingBuilderIntegrationTests.java | 15 +++++++++++++++ .../testcontainers-elasticsearch.properties | 2 +- 5 files changed, 24 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index bb27dd2f5..0c259c45b 100644 --- a/pom.xml +++ b/pom.xml @@ -21,8 +21,8 @@ 4.2.0-SNAPSHOT - 9.4.2 - 9.4.2 + 9.4.3 + 9.4.3 0.20.2 2.25.4 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 2d6170020..35c5e3a47 100644 --- a/src/main/antora/modules/ROOT/pages/elasticsearch/elasticsearch-new.adoc +++ b/src/main/antora/modules/ROOT/pages/elasticsearch/elasticsearch-new.adoc @@ -1,6 +1,11 @@ [[new-features]] = What's new +[[new-features.6-2-0]] +== New in Spring Data Elasticsearch 6.2 + +* Upgrade to Elasticsearch 9.4.3 + [[new-features.6-1-0]] == New in Spring Data Elasticsearch 6.1 diff --git a/src/main/antora/modules/ROOT/pages/elasticsearch/versions.adoc b/src/main/antora/modules/ROOT/pages/elasticsearch/versions.adoc index 76b310550..f63ff4420 100644 --- a/src/main/antora/modules/ROOT/pages/elasticsearch/versions.adoc +++ b/src/main/antora/modules/ROOT/pages/elasticsearch/versions.adoc @@ -6,6 +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 +| 2026.1 | 6.2.x | 9.4.3 | 7.0.x | 2026.0 | 6.1.x | 9.4.2 | 7.0.x | 2025.1 | 6.0.x | 9.2.2 | 7.0.x | 2025.0 | 5.5.xfootnote:oom[Out of maintenance] | 8.18.1 | 6.2.x diff --git a/src/test/java/org/springframework/data/elasticsearch/core/index/MappingBuilderIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/index/MappingBuilderIntegrationTests.java index 4662254a2..8abd5e484 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/index/MappingBuilderIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/index/MappingBuilderIntegrationTests.java @@ -280,6 +280,12 @@ public abstract class MappingBuilderIntegrationTests extends MappingContextBaseT operations.indexOps(FieldAliasEntity.class).createWithMapping(); } + @Test // #3298 + @DisplayName("should write index prefixes with default value") + void shouldWriteIndexPrefixesWithDefaultValue() { + operations.indexOps(TextIndexPrefixesEntity.class).createWithMapping(); + } + // region Entities @Document(indexName = "#{@indexNameProvider.indexName()}") static class Book { @@ -931,5 +937,14 @@ public abstract class MappingBuilderIntegrationTests extends MappingContextBaseT @Field(type = Text) private String otherText; } + @Document(indexName = "#{@indexNameProvider.indexName()}") + private static class TextIndexPrefixesEntity { + @Id + @Nullable private String id; + @Nullable + // the min value is set to the default + @Field(type = Text, indexPrefixes = @IndexPrefixes(maxChars = 10)) private String someText; + } + // endregion } diff --git a/src/test/resources/testcontainers-elasticsearch.properties b/src/test/resources/testcontainers-elasticsearch.properties index b3ccc12a9..fe904f17c 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=9.4.2 +sde.testcontainers.image-version=9.4.3 # # # 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