mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-07-08 19:42:45 +00:00
Polishing
This commit is contained in:
parent
9149c1bc2e
commit
6ad98bf500
@ -130,6 +130,10 @@ public @interface Field {
|
||||
boolean norms() default true;
|
||||
|
||||
/**
|
||||
* NOte that null_value setting are not supported in Elasticsearch for all types. For example setting a null_value on
|
||||
* a field with type text will throw an exception in the server when the mapping is written to Elasticsearch. Alas,
|
||||
* the Elasticsearch documentation does not specify on which types it is allowed on which it is not.
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
String nullValue() default "";
|
||||
|
@ -15,8 +15,8 @@
|
||||
*/
|
||||
package org.springframework.data.elasticsearch;
|
||||
|
||||
import static co.elastic.clients.elasticsearch._types.query_dsl.QueryBuilders.match;
|
||||
import static java.util.UUID.randomUUID;
|
||||
import static co.elastic.clients.elasticsearch._types.query_dsl.QueryBuilders.*;
|
||||
import static java.util.UUID.*;
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
import static org.springframework.data.elasticsearch.utils.IdGenerator.*;
|
||||
|
||||
|
@ -18,9 +18,6 @@ package org.springframework.data.elasticsearch.core.index;
|
||||
import static org.skyscreamer.jsonassert.JSONAssert.*;
|
||||
import static org.springframework.data.elasticsearch.annotations.FieldType.*;
|
||||
|
||||
import org.springframework.data.elasticsearch.annotations.FieldType;
|
||||
import org.springframework.data.elasticsearch.annotations.InnerField;
|
||||
import org.springframework.data.elasticsearch.annotations.MultiField;
|
||||
import reactor.core.publisher.Mono;
|
||||
import reactor.core.scheduler.Schedulers;
|
||||
|
||||
@ -34,7 +31,10 @@ import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.elasticsearch.annotations.DateFormat;
|
||||
import org.springframework.data.elasticsearch.annotations.Document;
|
||||
import org.springframework.data.elasticsearch.annotations.Field;
|
||||
import org.springframework.data.elasticsearch.annotations.FieldType;
|
||||
import org.springframework.data.elasticsearch.annotations.InnerField;
|
||||
import org.springframework.data.elasticsearch.annotations.Mapping;
|
||||
import org.springframework.data.elasticsearch.annotations.MultiField;
|
||||
import org.springframework.data.elasticsearch.core.MappingContextBaseTests;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
@ -82,7 +82,7 @@ public class ReactiveMappingBuilderUnitTests extends MappingContextBaseTests {
|
||||
|
||||
assertEquals(expected, mapping, true);
|
||||
}
|
||||
|
||||
|
||||
@Test // #2952
|
||||
void shouldMapNullityParameters() throws JSONException {
|
||||
// Given
|
||||
@ -108,9 +108,10 @@ public class ReactiveMappingBuilderUnitTests extends MappingContextBaseTests {
|
||||
}
|
||||
}
|
||||
""";
|
||||
|
||||
|
||||
// When
|
||||
String result = Mono.defer(() -> mappingBuilder.buildReactivePropertyMapping(MultiFieldWithNullEmptyParameters.class))
|
||||
String result = Mono
|
||||
.defer(() -> mappingBuilder.buildReactivePropertyMapping(MultiFieldWithNullEmptyParameters.class))
|
||||
.subscribeOn(Schedulers.parallel()).block();
|
||||
|
||||
// Then
|
||||
|
Loading…
x
Reference in New Issue
Block a user