修改elasticsearch工具配置说明

This commit is contained in:
fanghongchao
2018-11-28 14:20:47 +08:00
parent d2384e7df0
commit 70a004b4a3
2 changed files with 2 additions and 2 deletions
@@ -134,7 +134,7 @@ public class UISettingsController {
InetSocketAddress remoteAddress = userService.getUserRemoteAddress(); InetSocketAddress remoteAddress = userService.getUserRemoteAddress();
UserOptLog oplog = new UserOptLog(userService.getCurrentUserId(),userService.getCurrentUserName(), UserOptLog oplog = new UserOptLog(userService.getCurrentUserId(),userService.getCurrentUserName(),
userService.getCurrentUserRealName(), null==remoteAddress?"未知":userService.getUserRemoteAddress().getHostString(), userService.getCurrentUserRealName(), null==remoteAddress?"未知":remoteAddress.getHostString(),
System.currentTimeMillis()); System.currentTimeMillis());
oplog.setOpt_type(optType); oplog.setOpt_type(optType);
oplog.setLog_type(CommCode.LOG_TYPE_UISETTING); oplog.setLog_type(CommCode.LOG_TYPE_UISETTING);
@@ -54,7 +54,7 @@ public class ElasticsearchConfig {
// 配置信息 // 配置信息
Settings esSetting = Settings.builder() Settings esSetting = Settings.builder()
.put("cluster.name", clusterName) // 集群名字 .put("cluster.name", clusterName) // 集群名字
// .put("client.transport.sniff", true)// 增加嗅探机制,找到ES集群 只有在存在集群是才能开启嗅探 // .put("client.transport.sniff", true)// 增加嗅探机制,找到ES集群 (当前api无需嗅探,而且此处开启嗅探会导致链接失败)
.put("thread_pool.search.size", Integer.parseInt(poolSize))// 增加线程池个数,暂时设为5 .put("thread_pool.search.size", Integer.parseInt(poolSize))// 增加线程池个数,暂时设为5
.build(); .build();
// 配置信息Settings自定义 // 配置信息Settings自定义