- fix: 调整父子类型
This commit is contained in:
xpc 2025-04-12 20:42:07 +08:00
parent ae0a309087
commit f5a9db91ed
5 changed files with 12 additions and 8 deletions

View File

@ -5,6 +5,7 @@ import lombok.Data;
import org.dromara.easyes.annotation.IndexField;
import org.dromara.easyes.annotation.IndexId;
import org.dromara.easyes.annotation.rely.FieldType;
import org.dromara.easyes.common.join.BaseJoin;
/**
@ -13,7 +14,7 @@ import org.dromara.easyes.annotation.rely.FieldType;
* Copyright © 2024 xpc1024 All Rights Reserved
**/
@Data
public class Author {
public class Author extends BaseJoin {
/**
* 作者id
*/

View File

@ -7,6 +7,7 @@ import org.dromara.easyes.annotation.IndexName;
import org.dromara.easyes.annotation.rely.Analyzer;
import org.dromara.easyes.annotation.rely.FieldType;
import org.dromara.easyes.annotation.rely.JoinField;
import org.dromara.easyes.common.join.BaseJoin;
/**
@ -15,7 +16,7 @@ import org.dromara.easyes.annotation.rely.JoinField;
* Copyright © 2021 xpc1024 All Rights Reserved
**/
@Data
public class Comment {
public class Comment extends BaseJoin {
/**
* 评论id
*/

View File

@ -5,6 +5,7 @@ import lombok.Data;
import org.dromara.easyes.annotation.IndexField;
import org.dromara.easyes.annotation.IndexId;
import org.dromara.easyes.annotation.rely.FieldType;
import org.dromara.easyes.common.join.BaseJoin;
/**
@ -13,7 +14,7 @@ import org.dromara.easyes.annotation.rely.FieldType;
* Copyright © 2024 xpc1024 All Rights Reserved
**/
@Data
public class Contact {
public class Contact extends BaseJoin {
/**
* 联系人id
*/

View File

@ -128,7 +128,7 @@ public class NestedTest {
System.out.println(documents2);
LambdaEsQueryWrapper<Document> wrapper3 = new LambdaEsQueryWrapper<>();
wrapper3.nested("users.faqs", w -> w.match("users.faqs.faq_name", "q3").or().match("users.faqs.faq_name", "q4"));
wrapper3.nested("users.faqs", w -> w.match("users.faqs.faq_name", "q2").or().match("users.faqs.faq_name", "q4"));
List<Document> documents3 = documentMapper.selectList(wrapper3);
System.out.println(documents3);
}

View File

@ -1,9 +1,9 @@
easy-es:
# enable: true
address: 192.168.1.16:30156
address: 10.18.2.45:9200
# schema: http
username: elastic
password: mg123456
# username: elastic
# password: mg123456
keep-alive-millis: 18000
global-config:
i-kun-mode: false
@ -11,7 +11,7 @@ easy-es:
async-process-index-blocking: true
print-dsl: true
db-config:
map-underscore-to-camel-case: false
map-underscore-to-camel-case: true
id-type: customize
field-strategy: not_empty
refresh-policy: immediate
@ -25,6 +25,7 @@ easy-es:
# address: 10.18.2.45:9200 # 数据源2
#username: '若无可去掉此行'
#password: '若无可去掉此行'
compatible: true
#logging:
# level:
# tracer: trace