diff --git a/pom.xml b/pom.xml
index e6141114b0..91ed211d74 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,8 +21,8 @@
4.0.0-SNAPSHOT
- 9.1.5
- 9.1.5
+ 9.2.0
+ 9.2.0
0.20.2
2.25.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 eb4d01ad89..eb235805fd 100644
--- a/src/main/antora/modules/ROOT/pages/elasticsearch/elasticsearch-new.adoc
+++ b/src/main/antora/modules/ROOT/pages/elasticsearch/elasticsearch-new.adoc
@@ -6,7 +6,7 @@
* Upgrade to Spring 7
* Switch to jspecify nullability annotations
-* Upgrade to Elasticsearch 9.1.5
+* Upgrade to Elasticsearch 9.2.0
* Use the new Elasticsearch Rest5Client as default
* Add support for SpEL expressions in the `settingPath` parameter of the `@Setting` annotation
diff --git a/src/main/antora/modules/ROOT/pages/elasticsearch/versions.adoc b/src/main/antora/modules/ROOT/pages/elasticsearch/versions.adoc
index bf459d8c61..96fb56df56 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.1 (in development) | 6.0.x | 9.1.5 | 7.0.x
+| 2025.1 (in development) | 6.0.x | 9.2.0 | 7.0.x
| 2025.0 | 5.5.x | 8.18.1 | 6.2.x
| 2024.1 | 5.4.x | 8.15.5 | 6.1.x
| 2024.0 | 5.3.xfootnote:oom[Out of maintenance] | 8.13.4 | 6.1.x
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/Document.java b/src/main/java/org/springframework/data/elasticsearch/annotations/Document.java
index 1131b2cd59..3b60e83520 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/Document.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/Document.java
@@ -107,17 +107,15 @@
*/
Alias[] aliases() default {};
- /**
+ /**
+ * Note: the enum value FORCE, which was introduced in 4.4 has been removed
+ * again by Elasticsearch.
* @since 4.3
*/
enum VersionType {
INTERNAL("internal"), //
EXTERNAL("external"), //
- EXTERNAL_GTE("external_gte"), //
- /**
- * @since 4.4
- */
- FORCE("force");
+ EXTERNAL_GTE("external_gte"); //
private final String esName;
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/RequestConverter.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/RequestConverter.java
index 2147e31a9c..e841e1ba3e 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/RequestConverter.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/RequestConverter.java
@@ -1992,7 +1992,6 @@ private VersionType retrieveVersionTypeFromPersistentEntity(@Nullable Class> c
case INTERNAL -> VersionType.Internal;
case EXTERNAL -> VersionType.External;
case EXTERNAL_GTE -> VersionType.ExternalGte;
- case FORCE -> VersionType.Force;
};
}
}
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/TypeUtils.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/TypeUtils.java
index c6d4aa14b0..48f0efe82c 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/TypeUtils.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/TypeUtils.java
@@ -424,7 +424,6 @@ static VersionType versionType(
case INTERNAL -> VersionType.Internal;
case EXTERNAL -> VersionType.External;
case EXTERNAL_GTE -> VersionType.ExternalGte;
- case FORCE -> VersionType.Force;
};
}
diff --git a/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonEntity.java b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonEntity.java
index b18e02ed63..5a11e7ce27 100644
--- a/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonEntity.java
+++ b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonEntity.java
@@ -17,6 +17,7 @@
import java.util.Objects;
+import org.jspecify.annotations.NonNull;
import org.jspecify.annotations.Nullable;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
@@ -30,31 +31,31 @@ public class GeoJsonEntity {
@Nullable
@Id private String id;
@Nullable private GeoJsonPoint point1;
- @Nullable private GeoJson extends Iterable>> point2;
+ @Nullable private GeoJson extends @NonNull Iterable>> point2;
@Nullable private GeoJsonMultiPoint multiPoint1;
- @Nullable private GeoJson> multiPoint2;
+ @Nullable private GeoJson<@NonNull Iterable> multiPoint2;
@Nullable private GeoJsonLineString lineString1;
- @Nullable private GeoJson> lineString2;
+ @Nullable private GeoJson<@NonNull Iterable> lineString2;
@Nullable private GeoJsonMultiLineString multiLineString1;
- @Nullable private GeoJson> multiLineString2;
+ @Nullable private GeoJson<@NonNull Iterable> multiLineString2;
@Nullable private GeoJsonPolygon polygon1;
- @Nullable private GeoJson> polygon2;
+ @Nullable private GeoJson<@NonNull Iterable> polygon2;
@Nullable private GeoJsonMultiPolygon multiPolygon1;
- @Nullable private GeoJson> multiPolygon2;
+ @Nullable private GeoJson<@NonNull Iterable> multiPolygon2;
@Nullable private GeoJsonGeometryCollection geometryCollection1;
- @Nullable private GeoJson>> geometryCollection2;
+ @Nullable private GeoJson<@NonNull Iterable>> geometryCollection2;
public GeoJsonEntity() {}
public GeoJsonEntity(@Nullable String id, @Nullable GeoJsonPoint point1,
- @Nullable GeoJson extends Iterable>> point2, @Nullable GeoJsonMultiPoint multiPoint1,
- @Nullable GeoJson> multiPoint2, @Nullable GeoJsonLineString lineString1,
- @Nullable GeoJson> lineString2, @Nullable GeoJsonMultiLineString multiLineString1,
- @Nullable GeoJson> multiLineString2, @Nullable GeoJsonPolygon polygon1,
- @Nullable GeoJson> polygon2, @Nullable GeoJsonMultiPolygon multiPolygon1,
- @Nullable GeoJson> multiPolygon2,
- @Nullable GeoJsonGeometryCollection geometryCollection1,
- @Nullable GeoJson>> geometryCollection2) {
+ @Nullable GeoJson extends @NonNull Iterable>> point2, @Nullable GeoJsonMultiPoint multiPoint1,
+ @Nullable GeoJson<@NonNull Iterable> multiPoint2, @Nullable GeoJsonLineString lineString1,
+ @Nullable GeoJson<@NonNull Iterable> lineString2, @Nullable GeoJsonMultiLineString multiLineString1,
+ @Nullable GeoJson<@NonNull Iterable> multiLineString2, @Nullable GeoJsonPolygon polygon1,
+ @Nullable GeoJson<@NonNull Iterable> polygon2, @Nullable GeoJsonMultiPolygon multiPolygon1,
+ @Nullable GeoJson<@NonNull Iterable> multiPolygon2,
+ @Nullable GeoJsonGeometryCollection geometryCollection1,
+ @Nullable GeoJson<@NonNull Iterable>> geometryCollection2) {
this.id = id;
this.point1 = point1;
this.point2 = point2;
@@ -91,11 +92,11 @@ public void setPoint1(@Nullable GeoJsonPoint point1) {
}
@Nullable
- public GeoJson extends Iterable>> getPoint2() {
+ public GeoJson extends @NonNull Iterable>> getPoint2() {
return point2;
}
- public void setPoint2(@Nullable GeoJson extends Iterable>> point2) {
+ public void setPoint2(@Nullable GeoJson extends @NonNull Iterable>> point2) {
this.point2 = point2;
}
@@ -109,11 +110,11 @@ public void setMultiPoint1(@Nullable GeoJsonMultiPoint multiPoint1) {
}
@Nullable
- public GeoJson> getMultiPoint2() {
+ public GeoJson<@NonNull Iterable> getMultiPoint2() {
return multiPoint2;
}
- public void setMultiPoint2(@Nullable GeoJson> multiPoint2) {
+ public void setMultiPoint2(@Nullable GeoJson<@NonNull Iterable> multiPoint2) {
this.multiPoint2 = multiPoint2;
}
@@ -127,11 +128,11 @@ public void setLineString1(@Nullable GeoJsonLineString lineString1) {
}
@Nullable
- public GeoJson> getLineString2() {
+ public GeoJson<@NonNull Iterable> getLineString2() {
return lineString2;
}
- public void setLineString2(@Nullable GeoJson> lineString2) {
+ public void setLineString2(@Nullable GeoJson<@NonNull Iterable> lineString2) {
this.lineString2 = lineString2;
}
@@ -145,11 +146,11 @@ public void setMultiLineString1(@Nullable GeoJsonMultiLineString multiLineString
}
@Nullable
- public GeoJson> getMultiLineString2() {
+ public GeoJson<@NonNull Iterable> getMultiLineString2() {
return multiLineString2;
}
- public void setMultiLineString2(@Nullable GeoJson> multiLineString2) {
+ public void setMultiLineString2(@Nullable GeoJson<@NonNull Iterable> multiLineString2) {
this.multiLineString2 = multiLineString2;
}
@@ -163,11 +164,11 @@ public void setPolygon1(@Nullable GeoJsonPolygon polygon1) {
}
@Nullable
- public GeoJson> getPolygon2() {
+ public GeoJson<@NonNull Iterable> getPolygon2() {
return polygon2;
}
- public void setPolygon2(@Nullable GeoJson> polygon2) {
+ public void setPolygon2(@Nullable GeoJson<@NonNull Iterable> polygon2) {
this.polygon2 = polygon2;
}
@@ -181,11 +182,11 @@ public void setMultiPolygon1(@Nullable GeoJsonMultiPolygon multiPolygon1) {
}
@Nullable
- public GeoJson> getMultiPolygon2() {
+ public GeoJson<@NonNull Iterable> getMultiPolygon2() {
return multiPolygon2;
}
- public void setMultiPolygon2(@Nullable GeoJson> multiPolygon2) {
+ public void setMultiPolygon2(@Nullable GeoJson<@NonNull Iterable> multiPolygon2) {
this.multiPolygon2 = multiPolygon2;
}
@@ -199,11 +200,11 @@ public void setGeometryCollection1(@Nullable GeoJsonGeometryCollection geometryC
}
@Nullable
- public GeoJson>> getGeometryCollection2() {
+ public GeoJson<@NonNull Iterable>> getGeometryCollection2() {
return geometryCollection2;
}
- public void setGeometryCollection2(@Nullable GeoJson>> geometryCollection2) {
+ public void setGeometryCollection2(@Nullable GeoJson<@NonNull Iterable>> geometryCollection2) {
this.geometryCollection2 = geometryCollection2;
}
diff --git a/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonIntegrationTests.java
index 633aa97aa9..01b67b0290 100644
--- a/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonIntegrationTests.java
+++ b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonIntegrationTests.java
@@ -115,7 +115,7 @@ void shouldWriteAndReadAnEntityWithGeoJsonProperties() {
));
GeoJsonPolygon geoJsonPolygon = GeoJsonPolygon
.of(new Point(12, 34), new Point(56, 78), new Point(90, 12), new Point(12, 34))
- .withInnerRing(new Point(21, 43), new Point(65, 87), new Point(9, 21), new Point(21, 43));
+ .withInnerRing(new Point(35, 35), new Point(65, 30), new Point(55, 50), new Point(35, 35));
GeoJsonMultiPolygon geoJsonMultiPolygon = GeoJsonMultiPolygon
.of(Arrays.asList(GeoJsonPolygon.of(new Point(12, 34), new Point(56, 78), new Point(90, 12), new Point(12, 34)),
GeoJsonPolygon.of(new Point(21, 43), new Point(65, 87), new Point(9, 21), new Point(21, 43))));
diff --git a/src/test/resources/testcontainers-elasticsearch.properties b/src/test/resources/testcontainers-elasticsearch.properties
index 1b09cdcc6e..0156e4925f 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.1.5
+sde.testcontainers.image-version=9.2.0
#
#
# 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