Description
Hello
I am working on a SpringBoot 2.6 (using spring-data-elasticsearch 4.4.3) API
that needs to store null values explicitly
for that we are using storeNullValue attribute from Field annotation, added to 4.1
@JsonProperty(value = "longdescr") @Field(name = "longdescr", storeNullValue = true) private String longDescription;
Upgrading to SpringBoot 3.1 (using spring-data-elasticsearch 5.1)
null values are not indexed to elastic anymore.
I tested spring-data-elasticsearch from v5.0 to 5.2.2 without success
storeNullValue attribute is taken in account in MappingElasticSearchConcverter.java (5.1)
`
if (value == null) {
if (property.storeNullValue()) {
sink.set(property, null);
}
continue;
}
`
and this part is setting property to null as expected, as of my debugger.
According to results found over the net, this param is not popularly used.
Anyone experienced that issue ?
Anyone is using storeNullValue param proerly on v5 ?
Note that according to my tests, it is not related to ES
- my ES is still able to store null values from a direct POST.
- SpringBoot 2.6 is adding null values on both ES7 and ES8 instances.
- SpringBoot 3.1 is not adding null values on niether ES7 neither ES8.
thanks for caring :)
Bernard