Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4729b9cfdc | |||
| aa16c0c5ab | |||
| 5e507fa163 | |||
| a355537d78 | |||
| 4fbf9f8b5a | |||
| 2cb27c26d7 | |||
| c322797eab | |||
| c81958f62d | |||
| ed18be6f1c | |||
| b3a21fbb7c | |||
| d874b9d000 | |||
| 36e6a4b328 | |||
| 3710e47abd | |||
| c40abc267b | |||
| b479184d83 |
@@ -5,12 +5,12 @@
|
||||
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-elasticsearch</artifactId>
|
||||
<version>5.2.4</version>
|
||||
<version>5.2.7</version>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.data.build</groupId>
|
||||
<artifactId>spring-data-parent</artifactId>
|
||||
<version>3.2.4</version>
|
||||
<version>3.2.7</version>
|
||||
</parent>
|
||||
|
||||
<name>Spring Data Elasticsearch</name>
|
||||
@@ -18,7 +18,7 @@
|
||||
<url>https://github.com/spring-projects/spring-data-elasticsearch</url>
|
||||
|
||||
<properties>
|
||||
<springdata.commons>3.2.4</springdata.commons>
|
||||
<springdata.commons>3.2.7</springdata.commons>
|
||||
|
||||
<!-- version of the ElasticsearchClient -->
|
||||
<elasticsearch-java>8.11.4</elasticsearch-java>
|
||||
|
||||
+4
-4
@@ -169,8 +169,8 @@ public final class MappingParameters {
|
||||
positiveScoreImpact = field.positiveScoreImpact();
|
||||
dims = field.dims();
|
||||
if (type == FieldType.Dense_Vector) {
|
||||
Assert.isTrue(dims >= 1 && dims <= 2048,
|
||||
"Invalid required parameter! Dense_Vector value \"dims\" must be between 1 and 2048.");
|
||||
Assert.isTrue(dims >= 1 && dims <= 4096,
|
||||
"Invalid required parameter! Dense_Vector value \"dims\" must be between 1 and 4096.");
|
||||
}
|
||||
Assert.isTrue(field.enabled() || type == FieldType.Object, "enabled false is only allowed for field type object");
|
||||
enabled = field.enabled();
|
||||
@@ -212,8 +212,8 @@ public final class MappingParameters {
|
||||
positiveScoreImpact = field.positiveScoreImpact();
|
||||
dims = field.dims();
|
||||
if (type == FieldType.Dense_Vector) {
|
||||
Assert.isTrue(dims >= 1 && dims <= 2048,
|
||||
"Invalid required parameter! Dense_Vector value \"dims\" must be between 1 and 2048.");
|
||||
Assert.isTrue(dims >= 1 && dims <= 4096,
|
||||
"Invalid required parameter! Dense_Vector value \"dims\" must be between 1 and 4096.");
|
||||
}
|
||||
enabled = true;
|
||||
eagerGlobalOrdinals = field.eagerGlobalOrdinals();
|
||||
|
||||
@@ -70,7 +70,7 @@ public class Order extends Sort.Order {
|
||||
|
||||
public Order(Sort.Direction direction, String property, Sort.NullHandling nullHandlingHint, @Nullable Mode mode,
|
||||
@Nullable String unmappedType) {
|
||||
this(direction, property, nullHandlingHint, null, unmappedType, null);
|
||||
this(direction, property, nullHandlingHint, mode, unmappedType, null);
|
||||
}
|
||||
|
||||
public Order(Sort.Direction direction, String property, Sort.NullHandling nullHandlingHint, @Nullable Mode mode,
|
||||
|
||||
+1
-3
@@ -453,9 +453,7 @@ public class SimpleElasticsearchRepository<T, ID> implements ElasticsearchReposi
|
||||
|
||||
@Nullable
|
||||
public <R> R executeAndRefresh(OperationsCallback<R> callback, @Nullable RefreshPolicy refreshPolicy) {
|
||||
R result = callback.doWithOperations(operations.withRefreshPolicy(refreshPolicy));
|
||||
doRefresh();
|
||||
return result;
|
||||
return callback.doWithOperations(operations.withRefreshPolicy(refreshPolicy));
|
||||
}
|
||||
// endregion
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Spring Data Elasticsearch 5.2.4 (2023.1.4)
|
||||
Spring Data Elasticsearch 5.2.7 (2023.1.7)
|
||||
Copyright (c) [2013-2022] Pivotal Software, Inc.
|
||||
|
||||
This product is licensed to you under the Apache License, Version 2.0 (the "License").
|
||||
@@ -22,3 +22,6 @@ conditions of the subcomponent's license, as noted in the LICENSE file.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+17
-10
@@ -70,8 +70,8 @@ public class MappingParametersTest extends MappingContextBaseTests {
|
||||
}
|
||||
|
||||
@Test // #1700
|
||||
@DisplayName("should not allow dims length greater than 2048 for dense_vector type")
|
||||
void shouldNotAllowDimsLengthGreaterThan2048ForDenseVectorType() {
|
||||
@DisplayName("should not allow dims length greater than 4096 for dense_vector type")
|
||||
void shouldNotAllowDimsLengthGreaterThan4096ForDenseVectorType() {
|
||||
ElasticsearchPersistentEntity<?> failEntity = elasticsearchConverter.get().getMappingContext()
|
||||
.getRequiredPersistentEntity(DenseVectorInvalidDimsClass.class);
|
||||
Annotation annotation = failEntity.getRequiredPersistentProperty("dense_vector").findAnnotation(Field.class);
|
||||
@@ -90,21 +90,28 @@ public class MappingParametersTest extends MappingContextBaseTests {
|
||||
}
|
||||
|
||||
static class AnnotatedClass {
|
||||
@Nullable @Field private String field;
|
||||
@Nullable @MultiField(mainField = @Field,
|
||||
@Nullable
|
||||
@Field private String field;
|
||||
@Nullable
|
||||
@MultiField(mainField = @Field,
|
||||
otherFields = { @InnerField(suffix = "test", type = FieldType.Text) }) private String mainField;
|
||||
@Nullable @Field(type = FieldType.Text, docValues = false) private String docValuesText;
|
||||
@Nullable @Field(type = FieldType.Nested, docValues = false) private String docValuesNested;
|
||||
@Nullable @Field(type = Object, enabled = true) private String enabledObject;
|
||||
@Nullable @Field(type = Object, enabled = false) private String disabledObject;
|
||||
@Nullable
|
||||
@Field(type = FieldType.Text, docValues = false) private String docValuesText;
|
||||
@Nullable
|
||||
@Field(type = FieldType.Nested, docValues = false) private String docValuesNested;
|
||||
@Nullable
|
||||
@Field(type = Object, enabled = true) private String enabledObject;
|
||||
@Nullable
|
||||
@Field(type = Object, enabled = false) private String disabledObject;
|
||||
}
|
||||
|
||||
static class InvalidEnabledFieldClass {
|
||||
@Nullable @Field(type = FieldType.Text, enabled = false) private String disabledObject;
|
||||
@Nullable
|
||||
@Field(type = FieldType.Text, enabled = false) private String disabledObject;
|
||||
}
|
||||
|
||||
static class DenseVectorInvalidDimsClass {
|
||||
@Field(type = Dense_Vector, dims = 2049) private float[] dense_vector;
|
||||
@Field(type = Dense_Vector, dims = 4097) private float[] dense_vector;
|
||||
}
|
||||
|
||||
static class DenseVectorMissingDimsClass {
|
||||
|
||||
Reference in New Issue
Block a user