mirror of
https://gitee.com/dromara/easy-es.git
synced 2025-12-08 10:09:11 +08:00
feat: 兼容性属性添加
This commit is contained in:
parent
5a3ffe66ec
commit
922d121e1e
@ -19,6 +19,10 @@ public class EasyEsProperties {
|
|||||||
* 是否开启easy-es LOGO BANNER的打印
|
* 是否开启easy-es LOGO BANNER的打印
|
||||||
*/
|
*/
|
||||||
private boolean banner = true;
|
private boolean banner = true;
|
||||||
|
/**
|
||||||
|
* 是否开启兼容性(超低版本的es, 比如7.0.0开启该特性)
|
||||||
|
*/
|
||||||
|
private boolean compatible = false;
|
||||||
/**
|
/**
|
||||||
* es client address es客户端地址
|
* es client address es客户端地址
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -112,8 +112,10 @@ public class EsClientUtils {
|
|||||||
throw ExceptionUtils.eee(e);
|
throw ExceptionUtils.eee(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
// 兼容性配置
|
||||||
|
if (easyEsConfigProperties.isCompatible()) {
|
||||||
buildCompatible(httpClientBuilder);
|
buildCompatible(httpClientBuilder);
|
||||||
|
}
|
||||||
return httpClientBuilder;
|
return httpClientBuilder;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -155,6 +155,6 @@ public class Document extends BaseJoin {
|
|||||||
/**
|
/**
|
||||||
* 稠密向量类型,dims 非负 最大为2048
|
* 稠密向量类型,dims 非负 最大为2048
|
||||||
*/
|
*/
|
||||||
@IndexField(fieldType = FieldType.DENSE_VECTOR)
|
@IndexField(fieldType = FieldType.DENSE_VECTOR, dims = 3)
|
||||||
private double[] vector;
|
private double[] vector;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -187,7 +187,7 @@ public class AllTest {
|
|||||||
@Order(8)
|
@Order(8)
|
||||||
public void testSQL() {
|
public void testSQL() {
|
||||||
// 注意 sql中的from后面跟的是要被查询的索引名,也可以是索引别名(效果一样) 由于索引名可能会变,所以此处我采用别名ee_default_alias进行查询
|
// 注意 sql中的from后面跟的是要被查询的索引名,也可以是索引别名(效果一样) 由于索引名可能会变,所以此处我采用别名ee_default_alias进行查询
|
||||||
String sql = "select count(*) from ee_default_alias where star_num > 0";
|
String sql = "select count(*) from ee_default_alias where starNum > 0";
|
||||||
String jsonResult = documentMapper.executeSQL(sql);
|
String jsonResult = documentMapper.executeSQL(sql);
|
||||||
System.out.println(jsonResult);
|
System.out.println(jsonResult);
|
||||||
Assertions.assertNotNull(jsonResult);
|
Assertions.assertNotNull(jsonResult);
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
easy-es:
|
easy-es:
|
||||||
# enable: true
|
# enable: true
|
||||||
address: 127.0.0.1:9200
|
address: 127.0.0.1:9200
|
||||||
# schema: http
|
schema: https
|
||||||
# username: elastic
|
username: elastic
|
||||||
# password: mg123456
|
password: a2*HFkQU93mBnxOTaEAs
|
||||||
keep-alive-millis: 18000
|
keep-alive-millis: 18000
|
||||||
global-config:
|
global-config:
|
||||||
i-kun-mode: false
|
i-kun-mode: false
|
||||||
@ -26,6 +26,6 @@ easy-es:
|
|||||||
#username: '若无可去掉此行'
|
#username: '若无可去掉此行'
|
||||||
#password: '若无可去掉此行'
|
#password: '若无可去掉此行'
|
||||||
|
|
||||||
#logging:
|
logging:
|
||||||
# level:
|
level:
|
||||||
# tracer: trace
|
tracer: trace
|
||||||
Loading…
x
Reference in New Issue
Block a user