Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
<springdata.commons>4.0.0-SNAPSHOT</springdata.commons>

<!-- version of the ElasticsearchClient -->
<elasticsearch-java>9.1.5</elasticsearch-java>
<elasticsearch-rest-client>9.1.5</elasticsearch-rest-client>
<elasticsearch-java>9.2.0</elasticsearch-java>
<elasticsearch-rest-client>9.2.0</elasticsearch-rest-client>

<hoverfly>0.20.2</hoverfly>
<log4j>2.25.1</log4j>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,6 @@ static VersionType versionType(
case INTERNAL -> VersionType.Internal;
case EXTERNAL -> VersionType.External;
case EXTERNAL_GTE -> VersionType.ExternalGte;
case FORCE -> VersionType.Force;
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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<Iterable<Point>> multiPoint2;
@Nullable private GeoJson<@NonNull Iterable<Point>> multiPoint2;
@Nullable private GeoJsonLineString lineString1;
@Nullable private GeoJson<Iterable<Point>> lineString2;
@Nullable private GeoJson<@NonNull Iterable<Point>> lineString2;
@Nullable private GeoJsonMultiLineString multiLineString1;
@Nullable private GeoJson<Iterable<GeoJsonLineString>> multiLineString2;
@Nullable private GeoJson<@NonNull Iterable<GeoJsonLineString>> multiLineString2;
@Nullable private GeoJsonPolygon polygon1;
@Nullable private GeoJson<Iterable<GeoJsonLineString>> polygon2;
@Nullable private GeoJson<@NonNull Iterable<GeoJsonLineString>> polygon2;
@Nullable private GeoJsonMultiPolygon multiPolygon1;
@Nullable private GeoJson<Iterable<GeoJsonPolygon>> multiPolygon2;
@Nullable private GeoJson<@NonNull Iterable<GeoJsonPolygon>> multiPolygon2;
@Nullable private GeoJsonGeometryCollection geometryCollection1;
@Nullable private GeoJson<Iterable<GeoJson<?>>> geometryCollection2;
@Nullable private GeoJson<@NonNull Iterable<GeoJson<?>>> geometryCollection2;

public GeoJsonEntity() {}

public GeoJsonEntity(@Nullable String id, @Nullable GeoJsonPoint point1,
@Nullable GeoJson<? extends Iterable<?>> point2, @Nullable GeoJsonMultiPoint multiPoint1,
@Nullable GeoJson<Iterable<Point>> multiPoint2, @Nullable GeoJsonLineString lineString1,
@Nullable GeoJson<Iterable<Point>> lineString2, @Nullable GeoJsonMultiLineString multiLineString1,
@Nullable GeoJson<Iterable<GeoJsonLineString>> multiLineString2, @Nullable GeoJsonPolygon polygon1,
@Nullable GeoJson<Iterable<GeoJsonLineString>> polygon2, @Nullable GeoJsonMultiPolygon multiPolygon1,
@Nullable GeoJson<Iterable<GeoJsonPolygon>> multiPolygon2,
@Nullable GeoJsonGeometryCollection geometryCollection1,
@Nullable GeoJson<Iterable<GeoJson<?>>> geometryCollection2) {
@Nullable GeoJson<? extends @NonNull Iterable<?>> point2, @Nullable GeoJsonMultiPoint multiPoint1,
@Nullable GeoJson<@NonNull Iterable<Point>> multiPoint2, @Nullable GeoJsonLineString lineString1,
@Nullable GeoJson<@NonNull Iterable<Point>> lineString2, @Nullable GeoJsonMultiLineString multiLineString1,
@Nullable GeoJson<@NonNull Iterable<GeoJsonLineString>> multiLineString2, @Nullable GeoJsonPolygon polygon1,
@Nullable GeoJson<@NonNull Iterable<GeoJsonLineString>> polygon2, @Nullable GeoJsonMultiPolygon multiPolygon1,
@Nullable GeoJson<@NonNull Iterable<GeoJsonPolygon>> multiPolygon2,
@Nullable GeoJsonGeometryCollection geometryCollection1,
@Nullable GeoJson<@NonNull Iterable<GeoJson<?>>> geometryCollection2) {
this.id = id;
this.point1 = point1;
this.point2 = point2;
Expand Down Expand Up @@ -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;
}

Expand All @@ -109,11 +110,11 @@ public void setMultiPoint1(@Nullable GeoJsonMultiPoint multiPoint1) {
}

@Nullable
public GeoJson<Iterable<Point>> getMultiPoint2() {
public GeoJson<@NonNull Iterable<Point>> getMultiPoint2() {
return multiPoint2;
}

public void setMultiPoint2(@Nullable GeoJson<Iterable<Point>> multiPoint2) {
public void setMultiPoint2(@Nullable GeoJson<@NonNull Iterable<Point>> multiPoint2) {
this.multiPoint2 = multiPoint2;
}

Expand All @@ -127,11 +128,11 @@ public void setLineString1(@Nullable GeoJsonLineString lineString1) {
}

@Nullable
public GeoJson<Iterable<Point>> getLineString2() {
public GeoJson<@NonNull Iterable<Point>> getLineString2() {
return lineString2;
}

public void setLineString2(@Nullable GeoJson<Iterable<Point>> lineString2) {
public void setLineString2(@Nullable GeoJson<@NonNull Iterable<Point>> lineString2) {
this.lineString2 = lineString2;
}

Expand All @@ -145,11 +146,11 @@ public void setMultiLineString1(@Nullable GeoJsonMultiLineString multiLineString
}

@Nullable
public GeoJson<Iterable<GeoJsonLineString>> getMultiLineString2() {
public GeoJson<@NonNull Iterable<GeoJsonLineString>> getMultiLineString2() {
return multiLineString2;
}

public void setMultiLineString2(@Nullable GeoJson<Iterable<GeoJsonLineString>> multiLineString2) {
public void setMultiLineString2(@Nullable GeoJson<@NonNull Iterable<GeoJsonLineString>> multiLineString2) {
this.multiLineString2 = multiLineString2;
}

Expand All @@ -163,11 +164,11 @@ public void setPolygon1(@Nullable GeoJsonPolygon polygon1) {
}

@Nullable
public GeoJson<Iterable<GeoJsonLineString>> getPolygon2() {
public GeoJson<@NonNull Iterable<GeoJsonLineString>> getPolygon2() {
return polygon2;
}

public void setPolygon2(@Nullable GeoJson<Iterable<GeoJsonLineString>> polygon2) {
public void setPolygon2(@Nullable GeoJson<@NonNull Iterable<GeoJsonLineString>> polygon2) {
this.polygon2 = polygon2;
}

Expand All @@ -181,11 +182,11 @@ public void setMultiPolygon1(@Nullable GeoJsonMultiPolygon multiPolygon1) {
}

@Nullable
public GeoJson<Iterable<GeoJsonPolygon>> getMultiPolygon2() {
public GeoJson<@NonNull Iterable<GeoJsonPolygon>> getMultiPolygon2() {
return multiPolygon2;
}

public void setMultiPolygon2(@Nullable GeoJson<Iterable<GeoJsonPolygon>> multiPolygon2) {
public void setMultiPolygon2(@Nullable GeoJson<@NonNull Iterable<GeoJsonPolygon>> multiPolygon2) {
this.multiPolygon2 = multiPolygon2;
}

Expand All @@ -199,11 +200,11 @@ public void setGeometryCollection1(@Nullable GeoJsonGeometryCollection geometryC
}

@Nullable
public GeoJson<Iterable<GeoJson<?>>> getGeometryCollection2() {
public GeoJson<@NonNull Iterable<GeoJson<?>>> getGeometryCollection2() {
return geometryCollection2;
}

public void setGeometryCollection2(@Nullable GeoJson<Iterable<GeoJson<?>>> geometryCollection2) {
public void setGeometryCollection2(@Nullable GeoJson<@NonNull Iterable<GeoJson<?>>> geometryCollection2) {
this.geometryCollection2 = geometryCollection2;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))));
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/testcontainers-elasticsearch.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down