Polishing

This commit is contained in:
Peter-Josef Meisch 2024-08-19 20:14:13 +02:00
parent 9149c1bc2e
commit 6ad98bf500
No known key found for this signature in database
GPG Key ID: DE108246970C7708
3 changed files with 13 additions and 8 deletions

View File

@ -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 "";

View File

@ -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.*;

View File

@ -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;
@ -110,7 +110,8 @@ 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