@@ -70,8 +70,8 @@ void shouldAllowEnabledFalseOnlyOnObjectFields() {
70
70
}
71
71
72
72
@ Test // #1700
73
- @ DisplayName ("should not allow dims length greater than 2048 for dense_vector type" )
74
- void shouldNotAllowDimsLengthGreaterThan2048ForDenseVectorType () {
73
+ @ DisplayName ("should not allow dims length greater than 4096 for dense_vector type" )
74
+ void shouldNotAllowDimsLengthGreaterThan4096ForDenseVectorType () {
75
75
ElasticsearchPersistentEntity <?> failEntity = elasticsearchConverter .get ().getMappingContext ()
76
76
.getRequiredPersistentEntity (DenseVectorInvalidDimsClass .class );
77
77
Annotation annotation = failEntity .getRequiredPersistentProperty ("dense_vector" ).findAnnotation (Field .class );
@@ -90,21 +90,28 @@ void shouldRequireDimsParameterForDenseVectorType() {
90
90
}
91
91
92
92
static class AnnotatedClass {
93
- @ Nullable @ Field private String field ;
94
- @ Nullable @ MultiField (mainField = @ Field ,
93
+ @ Nullable
94
+ @ Field private String field ;
95
+ @ Nullable
96
+ @ MultiField (mainField = @ Field ,
95
97
otherFields = { @ InnerField (suffix = "test" , type = FieldType .Text ) }) private String mainField ;
96
- @ Nullable @ Field (type = FieldType .Text , docValues = false ) private String docValuesText ;
97
- @ Nullable @ Field (type = FieldType .Nested , docValues = false ) private String docValuesNested ;
98
- @ Nullable @ Field (type = Object , enabled = true ) private String enabledObject ;
99
- @ Nullable @ Field (type = Object , enabled = false ) private String disabledObject ;
98
+ @ Nullable
99
+ @ Field (type = FieldType .Text , docValues = false ) private String docValuesText ;
100
+ @ Nullable
101
+ @ Field (type = FieldType .Nested , docValues = false ) private String docValuesNested ;
102
+ @ Nullable
103
+ @ Field (type = Object , enabled = true ) private String enabledObject ;
104
+ @ Nullable
105
+ @ Field (type = Object , enabled = false ) private String disabledObject ;
100
106
}
101
107
102
108
static class InvalidEnabledFieldClass {
103
- @ Nullable @ Field (type = FieldType .Text , enabled = false ) private String disabledObject ;
109
+ @ Nullable
110
+ @ Field (type = FieldType .Text , enabled = false ) private String disabledObject ;
104
111
}
105
112
106
113
static class DenseVectorInvalidDimsClass {
107
- @ Field (type = Dense_Vector , dims = 2049 ) private float [] dense_vector ;
114
+ @ Field (type = Dense_Vector , dims = 4097 ) private float [] dense_vector ;
108
115
}
109
116
110
117
static class DenseVectorMissingDimsClass {
0 commit comments