modify query,use ouType&workspaceId&ouId

This commit is contained in:
pepsi 2022-10-24 10:03:05 +08:00
parent 7649083ad5
commit f06dfd5a4b

View File

@ -37,8 +37,15 @@ public class EsClientConfig {
@Value("${log-plat.elasticsearch.pwd:Axz0ES2021}")
private String password;
@Value("${xlog.es.storage:false}")
private boolean esStorageFlag;
@Bean
public RestHighLevelClient client() throws Exception {
if (!esStorageFlag) {
logger.info("not use es storage,esStorageFlag={}", esStorageFlag);
return null;
}
HttpHost[] hosts = covert2HttpHost(host, port);
if (hosts == null || hosts.length == 0) {
logger.error("can not init elasticsearch client,ip and port is empty.");