1.紧急修复1处0.9.40引入的缺陷,非必现,仅在不配置父子文档的情况下使用自动挡启动项目会报NPE(修复时间2小时内,发现即修复)
2.升级fastjson由1.2.79至1.2.83最新版
近期正在做全面压测和单测,即将上线1.0稳定版
This commit is contained in:
xpc1024 2022-06-29 18:25:07 +08:00
parent c8c1c751d7
commit 0badff0118
11 changed files with 18 additions and 13 deletions

View File

@ -7,7 +7,7 @@
<parent>
<groupId>cn.easy-es</groupId>
<artifactId>easy-es-parent</artifactId>
<version>0.9.50</version>
<version>0.9.60</version>
<relativePath>../easy-es-parent</relativePath>
</parent>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>easy-es-parent</artifactId>
<groupId>cn.easy-es</groupId>
<version>0.9.50</version>
<version>0.9.60</version>
<relativePath>../easy-es-parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -24,6 +24,7 @@ import org.springframework.context.ApplicationContext;
import java.lang.reflect.Proxy;
import java.util.Map;
import java.util.Optional;
/**
* 代理类
@ -82,7 +83,9 @@ public class MapperFactoryBean<T> implements FactoryBean<T> {
// 将子文档索引激活为父文档索引
if (!DefaultChildClass.class.equals(entityInfo.getChildClass())) {
EntityInfoHelper.getEntityInfo(entityInfo.getChildClass()).setIndexName(entityInfo.getIndexName());
Optional.ofNullable(entityInfo.getChildClass())
.flatMap(childClass -> Optional.ofNullable(EntityInfoHelper.getEntityInfo(childClass)))
.ifPresent(childEntityInfo -> childEntityInfo.setIndexName(entityInfo.getIndexName()));
}
}
} else {

View File

@ -6,7 +6,7 @@
<parent>
<groupId>cn.easy-es</groupId>
<artifactId>easy-es-parent</artifactId>
<version>0.9.50</version>
<version>0.9.60</version>
<relativePath>../easy-es-parent</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>cn.easy-es</groupId>
<artifactId>easy-es-parent</artifactId>
<version>0.9.50</version>
<version>0.9.60</version>
<relativePath>../easy-es-parent</relativePath>
</parent>

View File

@ -491,8 +491,10 @@ public class IndexUtils {
boolean addChild = !DefaultChildClass.class.equals(entityInfo.getChildClass()) && !isNested;
if (addChild) {
// 追加子文档信息
EntityInfo childEntityInfo = EntityInfoHelper.getEntityInfo(entityInfo.getChildClass());
List<EntityFieldInfo> childFieldList = childEntityInfo.getFieldList();
List<EntityFieldInfo> childFieldList = Optional.ofNullable(entityInfo.getChildClass())
.flatMap(childClass->Optional.ofNullable(EntityInfoHelper.getEntityInfo(childClass))
.map(EntityInfo::getFieldList))
.orElse(new ArrayList<>(0));
if (!CollectionUtils.isEmpty(childFieldList)) {
childFieldList.forEach(child -> {
// 子文档仅支持match查询,所以如果用户未指定子文档索引类型,则将默认的keyword类型转换为text类型

View File

@ -7,7 +7,7 @@
<parent>
<groupId>cn.easy-es</groupId>
<artifactId>easy-es-parent</artifactId>
<version>0.9.50</version>
<version>0.9.60</version>
<relativePath>../easy-es-parent</relativePath>
</parent>

View File

@ -6,7 +6,7 @@
<groupId>cn.easy-es</groupId>
<artifactId>easy-es-parent</artifactId>
<version>0.9.50</version>
<version>0.9.60</version>
<name>easy-es-parent</name>
<description>easy use for elastic search</description>
@ -32,7 +32,7 @@
<lombok.version>1.18.12</lombok.version>
<es-rest-high-level-client.version>7.10.1</es-rest-high-level-client.version>
<es.version>7.10.1</es.version>
<fastjson.version>1.2.79</fastjson.version>
<fastjson.version>1.2.83</fastjson.version>
<codec.version>1.6</codec.version>
<spring-boot.version>2.5.4</spring-boot.version>
</properties>

View File

@ -9,7 +9,7 @@
<parent>
<artifactId>easy-es</artifactId>
<groupId>cn.easy-es</groupId>
<version>0.9.50</version>
<version>0.9.60</version>
</parent>
<properties>

View File

@ -7,7 +7,7 @@
<parent>
<artifactId>easy-es</artifactId>
<groupId>cn.easy-es</groupId>
<version>0.9.50</version>
<version>0.9.60</version>
</parent>
<artifactId>easy-es-test</artifactId>

View File

@ -6,7 +6,7 @@
<groupId>cn.easy-es</groupId>
<artifactId>easy-es</artifactId>
<version>0.9.50</version>
<version>0.9.60</version>
<name>easy-es</name>
<description>easy use for elastic search</description>