1
0
mirror of synced 2026-05-25 05:33:18 +00:00

Compare commits

...

8 Commits

Author SHA1 Message Date
Mark Paluch 3a295cfa12 Release version 6.0.3 (2025.1.3).
See #3226
2026-02-13 11:15:46 +01:00
Mark Paluch efe7932d42 Prepare 6.0.3 (2025.1.3).
See #3226
2026-02-13 11:15:27 +01:00
Peter-Josef Meisch 26a7b48c4b Upgrade to Elasticsearch 9.2.5.
Closes #3236

Signed-off-by: Peter-Josef Meisch <pj.meisch@sothawo.com>
2026-02-08 18:24:59 +01:00
Peter-Josef Meisch 34a0d9b600 Fix setting script id in UpdateQuery request.
Closes #3231

Signed-off-by: Peter-Josef Meisch <pj.meisch@sothawo.com>
(cherry picked from commit ead1926d13)
2026-02-01 13:39:36 +01:00
Mark Paluch cb32d1991d Update CI Properties.
See #3226
2026-01-28 10:41:14 +01:00
Peter-Josef Meisch fbf9c355fa Upgrade to Elasticsearch 9.2.4. (#3229)
Closes #3228

Signed-off-by: Peter-Josef Meisch <pj.meisch@sothawo.com>
2026-01-23 19:53:00 +01:00
Christoph Strobl 2dbca48cdf After release cleanups.
See #3214
2026-01-16 10:39:48 +01:00
Christoph Strobl e7366973b7 Prepare next development iteration.
See #3214
2026-01-16 10:39:47 +01:00
8 changed files with 61 additions and 22 deletions
+1 -1
View File
@@ -3,6 +3,6 @@
<extension>
<groupId>io.spring.develocity.conventions</groupId>
<artifactId>develocity-conventions-maven-extension</artifactId>
<version>0.0.22</version>
<version>0.0.25</version>
</extension>
</extensions>
+2 -2
View File
@@ -1,6 +1,6 @@
# Java versions
java.main.tag=25-jdk-noble
java.next.tag=25-jdk-noble
java.main.tag=25.0.1_8-jdk-noble
java.next.tag=25.0.1_8-jdk-noble
# Docker container images - standard
docker.java.main.image=library/eclipse-temurin:${java.main.tag}
+5 -5
View File
@@ -5,12 +5,12 @@
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-elasticsearch</artifactId>
<version>6.0.2</version>
<version>6.0.3</version>
<parent>
<groupId>org.springframework.data.build</groupId>
<artifactId>spring-data-parent</artifactId>
<version>4.0.2</version>
<version>4.0.3</version>
</parent>
<name>Spring Data Elasticsearch</name>
@@ -18,11 +18,11 @@
<url>https://github.com/spring-projects/spring-data-elasticsearch</url>
<properties>
<springdata.commons>4.0.2</springdata.commons>
<springdata.commons>4.0.3</springdata.commons>
<!-- version of the ElasticsearchClient -->
<elasticsearch-java>9.2.3</elasticsearch-java>
<elasticsearch-rest-client>9.2.3</elasticsearch-rest-client>
<elasticsearch-java>9.2.5</elasticsearch-java>
<elasticsearch-rest-client>9.2.5</elasticsearch-rest-client>
<hoverfly>0.20.2</hoverfly>
<log4j>2.25.1</log4j>
@@ -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 | 6.0.x | 9.2.3 | 7.0.x
| 2025.1 | 6.0.x | 9.2.5 | 7.0.x
| 2025.0 | 5.5.x | 8.18.1 | 6.2.x
| 2024.1 | 5.4.xfootnote:oom[Out of maintenance] | 8.15.5 | 6.1.x
| 2024.0 | 5.3.xfootnote:oom[] | 8.13.4 | 6.1.x
@@ -48,6 +48,7 @@ import co.elastic.clients.elasticsearch.core.search.Rescore;
import co.elastic.clients.elasticsearch.core.search.SearchRequestBody;
import co.elastic.clients.elasticsearch.core.search.SourceConfig;
import co.elastic.clients.elasticsearch.indices.*;
import co.elastic.clients.elasticsearch.indices.ExistsIndexTemplateRequest;
import co.elastic.clients.elasticsearch.indices.ExistsRequest;
import co.elastic.clients.elasticsearch.indices.update_aliases.Action;
import co.elastic.clients.elasticsearch.sql.query.SqlFormat;
@@ -77,15 +78,12 @@ import java.util.stream.Stream;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jspecify.annotations.Nullable;
import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.data.domain.Sort;
import org.springframework.data.elasticsearch.core.RefreshPolicy;
import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter;
import org.springframework.data.elasticsearch.core.document.Document;
import org.springframework.data.elasticsearch.core.index.AliasAction;
import org.springframework.data.elasticsearch.core.index.AliasActionParameters;
import org.springframework.data.elasticsearch.core.index.AliasActions;
import org.springframework.data.elasticsearch.core.index.*;
import org.springframework.data.elasticsearch.core.index.DeleteIndexTemplateRequest;
import org.springframework.data.elasticsearch.core.index.DeleteTemplateRequest;
import org.springframework.data.elasticsearch.core.index.ExistsTemplateRequest;
@@ -1065,7 +1063,10 @@ class RequestConverter extends AbstractQueryProcessor {
return UpdateRequest.of(uqb -> {
uqb.index(indexName).id(query.getId());
if (query.getScript() != null) {
var scriptData = query.getScriptData();
var script = scriptData != null ? scriptData.script() : null;
if (script != null) {
Map<String, JsonData> params = new HashMap<>();
if (query.getParams() != null) {
@@ -1073,11 +1074,14 @@ class RequestConverter extends AbstractQueryProcessor {
}
uqb.script(sb -> {
sb.lang(query.getLang()).params(params);
if (query.getScript() != null) {
sb.source(s -> s.scriptString(query.getScript()));
sb
.lang(scriptData.language())
.params(params);
if (script != null) {
sb.source(s -> s.scriptString(script));
}
sb.id(query.getId());
sb.id(scriptData.scriptName());
return sb;
});
@@ -1126,8 +1130,7 @@ class RequestConverter extends AbstractQueryProcessor {
}
return uqb;
} //
);
});
}
public UpdateByQueryRequest documentUpdateByQueryRequest(UpdateQuery updateQuery, IndexCoordinates index,
+2 -1
View File
@@ -1,4 +1,4 @@
Spring Data Elasticsearch 6.0.2 (2025.1.2)
Spring Data Elasticsearch 6.0.3 (2025.1.3)
Copyright (c) [2013-2022] Pivotal Software, Inc.
This product is licensed to you under the Apache License, Version 2.0 (the "License").
@@ -18,3 +18,4 @@ conditions of the subcomponent's license, as noted in the LICENSE file.
@@ -17,6 +17,7 @@ package org.springframework.data.elasticsearch.client.elc;
import static org.assertj.core.api.Assertions.*;
import co.elastic.clients.elasticsearch.core.UpdateRequest;
import co.elastic.clients.json.jackson.JacksonJsonpMapper;
import java.util.List;
@@ -36,6 +37,7 @@ import org.springframework.data.elasticsearch.core.query.CriteriaQuery;
import org.springframework.data.elasticsearch.core.query.DeleteQuery;
import org.springframework.data.elasticsearch.core.query.DocValueField;
import org.springframework.data.elasticsearch.core.query.StringQuery;
import org.springframework.data.elasticsearch.core.query.UpdateQuery;
/**
* @author Peter-Josef Meisch
@@ -96,4 +98,37 @@ class RequestConverterTest {
@Nullable
@Field(type = FieldType.Text) private String text;
}
@Test // #3231
@DisplayName("should not use updatequery id for script id")
void shouldNotUseUpdatequeryIdForScriptId() {
var updateQuery = UpdateQuery
.builder("queryId")
.withScript("script")
.build();
UpdateRequest<org.springframework.data.elasticsearch.core.document.Document, ?> updateRequest = requestConverter
.documentUpdateRequest(updateQuery, IndexCoordinates.of("foo"), null, null);
assertThat(updateRequest.id()).isEqualTo("queryId");
assertThat(updateRequest.script().source().scriptString()).isEqualTo("script");
assertThat(updateRequest.script().id()).isNull();
}
@Test // #3231
@DisplayName("should use script name as update query id")
void shouldUseScriptNameAsUpdateQueryId() {
var updateQuery = UpdateQuery
.builder("queryId")
.withScript("script")
.withScriptName("scriptName")
.build();
UpdateRequest<org.springframework.data.elasticsearch.core.document.Document, ?> updateRequest = requestConverter
.documentUpdateRequest(updateQuery, IndexCoordinates.of("foo"), null, null);
assertThat(updateRequest.id()).isEqualTo("queryId");
assertThat(updateRequest.script().source().scriptString()).isEqualTo("script");
assertThat(updateRequest.script().id()).isEqualTo("scriptName");
}
}
@@ -15,7 +15,7 @@
#
#
sde.testcontainers.image-name=docker.elastic.co/elasticsearch/elasticsearch
sde.testcontainers.image-version=9.2.3
sde.testcontainers.image-version=9.2.5
#
#
# 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