mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-29 07:12:26 +00:00
Upgrade to Elasticsearch 8.13.4.
Original Pull Request #2918 Closes #2915
This commit is contained in:
parent
5ebe9f4492
commit
86e0e660be
2
pom.xml
2
pom.xml
@ -21,7 +21,7 @@
|
|||||||
<springdata.commons>3.4.0-SNAPSHOT</springdata.commons>
|
<springdata.commons>3.4.0-SNAPSHOT</springdata.commons>
|
||||||
|
|
||||||
<!-- version of the ElasticsearchClient -->
|
<!-- version of the ElasticsearchClient -->
|
||||||
<elasticsearch-java>8.13.2</elasticsearch-java>
|
<elasticsearch-java>8.13.4</elasticsearch-java>
|
||||||
|
|
||||||
<blockhound-junit>1.0.8.RELEASE</blockhound-junit>
|
<blockhound-junit>1.0.8.RELEASE</blockhound-junit>
|
||||||
<hoverfly>0.14.4</hoverfly>
|
<hoverfly>0.14.4</hoverfly>
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
[[new-features]]
|
[[new-features]]
|
||||||
= What's new
|
= What's new
|
||||||
|
|
||||||
|
[[new-features.5-4-0]]
|
||||||
|
== New in Spring Data Elasticsearch 5.4
|
||||||
|
|
||||||
|
* Upgrade to Elasticsearch 8.13.4.
|
||||||
|
|
||||||
[[new-features.5-3-0]]
|
[[new-features.5-3-0]]
|
||||||
== New in Spring Data Elasticsearch 5.3
|
== New in Spring Data Elasticsearch 5.3
|
||||||
|
|
||||||
|
@ -6,8 +6,8 @@ The following table shows the Elasticsearch and Spring versions that are used by
|
|||||||
[cols="^,^,^,^",options="header"]
|
[cols="^,^,^,^",options="header"]
|
||||||
|===
|
|===
|
||||||
| Spring Data Release Train | Spring Data Elasticsearch | Elasticsearch | Spring Framework
|
| Spring Data Release Train | Spring Data Elasticsearch | Elasticsearch | Spring Framework
|
||||||
| 2024.1 (in development) | 5.3.x | 8.13.2 | 6.1.x
|
| 2024.1 (in development) | 5.3.x | 8.13.4 | 6.1.x
|
||||||
| 2024.0 | 5.3.x | 8.13.2 | 6.1.x
|
| 2024.0 | 5.3.1 | 8.13.4 | 6.1.x
|
||||||
| 2023.1 (Vaughan) | 5.2.x | 8.11.1 | 6.1.x
|
| 2023.1 (Vaughan) | 5.2.x | 8.11.1 | 6.1.x
|
||||||
| 2023.0 (Ullmann) | 5.1.x | 8.7.1 | 6.0.x
|
| 2023.0 (Ullmann) | 5.1.x | 8.7.1 | 6.0.x
|
||||||
| 2022.0 (Turing) | 5.0.xfootnote:oom[Out of maintenance] | 8.5.3 | 6.0.x
|
| 2022.0 (Turing) | 5.0.xfootnote:oom[Out of maintenance] | 8.5.3 | 6.0.x
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
package org.springframework.data.elasticsearch.client.elc;
|
package org.springframework.data.elasticsearch.client.elc;
|
||||||
|
|
||||||
import co.elastic.clients.elasticsearch._types.KnnQuery;
|
import co.elastic.clients.elasticsearch._types.KnnQuery;
|
||||||
|
import co.elastic.clients.elasticsearch._types.KnnSearch;
|
||||||
import co.elastic.clients.elasticsearch._types.SortOptions;
|
import co.elastic.clients.elasticsearch._types.SortOptions;
|
||||||
import co.elastic.clients.elasticsearch._types.aggregations.Aggregation;
|
import co.elastic.clients.elasticsearch._types.aggregations.Aggregation;
|
||||||
import co.elastic.clients.elasticsearch._types.query_dsl.Query;
|
import co.elastic.clients.elasticsearch._types.query_dsl.Query;
|
||||||
@ -54,6 +55,7 @@ public class NativeQuery extends BaseQuery {
|
|||||||
|
|
||||||
private Map<String, JsonData> searchExtensions = Collections.emptyMap();
|
private Map<String, JsonData> searchExtensions = Collections.emptyMap();
|
||||||
@Nullable private KnnQuery knnQuery;
|
@Nullable private KnnQuery knnQuery;
|
||||||
|
@Nullable private List<KnnSearch> knnSearches = Collections.emptyList();
|
||||||
|
|
||||||
public NativeQuery(NativeQueryBuilder builder) {
|
public NativeQuery(NativeQueryBuilder builder) {
|
||||||
super(builder);
|
super(builder);
|
||||||
@ -71,6 +73,7 @@ public class NativeQuery extends BaseQuery {
|
|||||||
}
|
}
|
||||||
this.springDataQuery = builder.getSpringDataQuery();
|
this.springDataQuery = builder.getSpringDataQuery();
|
||||||
this.knnQuery = builder.getKnnQuery();
|
this.knnQuery = builder.getKnnQuery();
|
||||||
|
this.knnSearches = builder.getKnnSearches();
|
||||||
}
|
}
|
||||||
|
|
||||||
public NativeQuery(@Nullable Query query) {
|
public NativeQuery(@Nullable Query query) {
|
||||||
@ -129,6 +132,14 @@ public class NativeQuery extends BaseQuery {
|
|||||||
return knnQuery;
|
return knnQuery;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 5.3.1
|
||||||
|
*/
|
||||||
|
@Nullable
|
||||||
|
public List<KnnSearch> getKnnSearches() {
|
||||||
|
return knnSearches;
|
||||||
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public org.springframework.data.elasticsearch.core.query.Query getSpringDataQuery() {
|
public org.springframework.data.elasticsearch.core.query.Query getSpringDataQuery() {
|
||||||
return springDataQuery;
|
return springDataQuery;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
package org.springframework.data.elasticsearch.client.elc;
|
package org.springframework.data.elasticsearch.client.elc;
|
||||||
|
|
||||||
import co.elastic.clients.elasticsearch._types.KnnQuery;
|
import co.elastic.clients.elasticsearch._types.KnnQuery;
|
||||||
|
import co.elastic.clients.elasticsearch._types.KnnSearch;
|
||||||
import co.elastic.clients.elasticsearch._types.SortOptions;
|
import co.elastic.clients.elasticsearch._types.SortOptions;
|
||||||
import co.elastic.clients.elasticsearch._types.aggregations.Aggregation;
|
import co.elastic.clients.elasticsearch._types.aggregations.Aggregation;
|
||||||
import co.elastic.clients.elasticsearch._types.query_dsl.Query;
|
import co.elastic.clients.elasticsearch._types.query_dsl.Query;
|
||||||
@ -26,6 +27,7 @@ import co.elastic.clients.util.ObjectBuilder;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -52,6 +54,7 @@ public class NativeQueryBuilder extends BaseQueryBuilder<NativeQuery, NativeQuer
|
|||||||
|
|
||||||
@Nullable private org.springframework.data.elasticsearch.core.query.Query springDataQuery;
|
@Nullable private org.springframework.data.elasticsearch.core.query.Query springDataQuery;
|
||||||
@Nullable private KnnQuery knnQuery;
|
@Nullable private KnnQuery knnQuery;
|
||||||
|
@Nullable private List<KnnSearch> knnSearches = Collections.emptyList();
|
||||||
|
|
||||||
public NativeQueryBuilder() {}
|
public NativeQueryBuilder() {}
|
||||||
|
|
||||||
@ -92,6 +95,14 @@ public class NativeQueryBuilder extends BaseQueryBuilder<NativeQuery, NativeQuer
|
|||||||
return knnQuery;
|
return knnQuery;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 5.3.1
|
||||||
|
*/
|
||||||
|
@Nullable
|
||||||
|
public List<KnnSearch> getKnnSearches() {
|
||||||
|
return knnSearches;
|
||||||
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public org.springframework.data.elasticsearch.core.query.Query getSpringDataQuery() {
|
public org.springframework.data.elasticsearch.core.query.Query getSpringDataQuery() {
|
||||||
return springDataQuery;
|
return springDataQuery;
|
||||||
|
@ -1719,7 +1719,18 @@ class RequestConverter extends AbstractQueryProcessor {
|
|||||||
;
|
;
|
||||||
|
|
||||||
if (query.getKnnQuery() != null) {
|
if (query.getKnnQuery() != null) {
|
||||||
builder.knn(query.getKnnQuery());
|
var kq = query.getKnnQuery();
|
||||||
|
builder.knn(ksb -> ksb
|
||||||
|
.field(kq.field())
|
||||||
|
.queryVector(kq.queryVector())
|
||||||
|
.numCandidates(kq.numCandidates())
|
||||||
|
.filter(kq.filter())
|
||||||
|
.similarity(kq.similarity()));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isEmpty(query.getKnnSearches())) {
|
||||||
|
builder.knn(query.getKnnSearches());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isEmpty(query.getAggregations())) {
|
if (!isEmpty(query.getAggregations())) {
|
||||||
@ -1740,7 +1751,18 @@ class RequestConverter extends AbstractQueryProcessor {
|
|||||||
.sort(query.getSortOptions());
|
.sort(query.getSortOptions());
|
||||||
|
|
||||||
if (query.getKnnQuery() != null) {
|
if (query.getKnnQuery() != null) {
|
||||||
builder.knn(query.getKnnQuery());
|
var kq = query.getKnnQuery();
|
||||||
|
builder.knn(ksb -> ksb
|
||||||
|
.field(kq.field())
|
||||||
|
.queryVector(kq.queryVector())
|
||||||
|
.numCandidates(kq.numCandidates())
|
||||||
|
.filter(kq.filter())
|
||||||
|
.similarity(kq.similarity()));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isEmpty(query.getKnnSearches())) {
|
||||||
|
builder.knn(query.getKnnSearches());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isEmpty(query.getAggregations())) {
|
if (!isEmpty(query.getAggregations())) {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
sde.testcontainers.image-name=docker.elastic.co/elasticsearch/elasticsearch
|
sde.testcontainers.image-name=docker.elastic.co/elasticsearch/elasticsearch
|
||||||
sde.testcontainers.image-version=8.13.2
|
sde.testcontainers.image-version=8.13.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
|
# 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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user