mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-01 09:42:11 +00:00
Polishing
This commit is contained in:
parent
3f2ab4b06a
commit
dd3d01eab6
@ -31,6 +31,7 @@ import lombok.Setter;
|
||||
import java.lang.Boolean;
|
||||
import java.lang.Double;
|
||||
import java.lang.Integer;
|
||||
import java.lang.Object;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Collection;
|
||||
@ -563,9 +564,8 @@ public class MappingBuilderUnitTests extends MappingContextBaseTests {
|
||||
@DisplayName("should only allow disabled properties on type object")
|
||||
void shouldOnlyAllowDisabledPropertiesOnTypeObject() {
|
||||
|
||||
assertThatThrownBy(() ->
|
||||
getMappingBuilder().buildPropertyMapping(InvalidDisabledMappingProperty.class)
|
||||
).isInstanceOf(MappingException.class);
|
||||
assertThatThrownBy(() -> getMappingBuilder().buildPropertyMapping(InvalidDisabledMappingProperty.class))
|
||||
.isInstanceOf(MappingException.class);
|
||||
}
|
||||
|
||||
@Setter
|
||||
@ -999,15 +999,13 @@ public class MappingBuilderUnitTests extends MappingContextBaseTests {
|
||||
@Data
|
||||
static class InvalidDisabledMappingProperty {
|
||||
@Id private String id;
|
||||
@Mapping(enabled = false)
|
||||
@Field(type = Text) private String text;
|
||||
@Mapping(enabled = false) @Field(type = Text) private String text;
|
||||
}
|
||||
|
||||
@Data
|
||||
static class DisabledMappingProperty {
|
||||
@Id private String id;
|
||||
@Field(type = Text) private String text;
|
||||
@Mapping(enabled = false)
|
||||
@Field(type = Object) private Object object;
|
||||
@Mapping(enabled = false) @Field(type = Object) private Object object;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package org.springframework.data.elasticsearch.core.index;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
import static org.springframework.data.elasticsearch.annotations.FieldType.Dense_Vector;
|
||||
import static org.springframework.data.elasticsearch.annotations.FieldType.*;
|
||||
import static org.springframework.data.elasticsearch.annotations.FieldType.Object;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
|
Loading…
x
Reference in New Issue
Block a user