Commit f79c2950 by 姚冰

[chg] 得分计算优化,减少部分日志内容

1 parent 5f7f1352
......@@ -180,7 +180,7 @@ public class PersonService {
}
success.setMatch(1);
success.setPersonPoolStatus(poolStatus);
log.info("人员匹配操作完成,PoolIds:{}, poolStatus:{},rid:{},耗时:{}", poolIds, JSON.toJSONString(poolStatus), rid, System.currentTimeMillis() - startTime);
log.info("人员匹配,Pool:{}, status:{},rid:{},time:{}", poolIds, JSON.toJSONString(poolStatus), rid, System.currentTimeMillis() - startTime);
return success;
} catch (ElasticsearchException e) {
if (e.status() == 400 && e.getMessage().contains(Constant.CLASS_CAST_EXCEPTION)) {
......@@ -424,7 +424,7 @@ public class PersonService {
.query(getSearchSourceBuilder(feature, person, type)._toQuery())
.script(new Script.Builder()
.lang("painless")
.source("(_score + 1)/2 * 100")
.source("_score * 100")
.params("body", JsonData.of(0.0f))
.build())
.boost(1.0f)
......
......@@ -79,7 +79,7 @@ public class PoolService {
public ResponseVo createPool(RequestVo requestVo, boolean addPerson) throws Exception {
String rid = requestVo.getRid();
String poolId = requestVo.getPoolId();
log.info("特征池创建操作开始:[{}},IML:{}", poolId, requestVo.isUseILMPolicy());
// log.info("特征池创建操作开始:[{}},IML:{}", poolId, requestVo.isUseILMPolicy());
try {
IndexSettings.Builder settings = new IndexSettings.Builder()
......@@ -117,7 +117,7 @@ public class PoolService {
}
}
log.info("特征池创建操作完成:[{}],ILM:{}", poolId, requestVo.isUseILMPolicy());
log.info("特征池创建完成:[{}],ILM:{}", poolId, requestVo.isUseILMPolicy());
return ResponseVo.success(rid);
} catch (ElasticsearchException e) {
if (e.status() == 400 && e.getMessage().contains(Constant.STR_POOL_ID_ALREADY_EXISTS)) {
......@@ -141,7 +141,7 @@ public class PoolService {
String rid = requestVo.getRid();
Integer flushPool = requestVo.getFlushPool();
String poolId = requestVo.getPoolId();
log.info("特征池删除操作开始:[{}],FlushPool:[{}]", poolId, flushPool);
// log.info("特征池删除操作开始:[{}],FlushPool:[{}]", poolId, flushPool);
try {
if (0 == flushPool) {
List<HashMap<String, String>> personIds = requestVo.getPersonIds();
......@@ -155,7 +155,7 @@ public class PoolService {
//删除索引
DeleteIndexResponse delete = client.indices().delete(new DeleteIndexRequest.Builder().index(poolId).build());
}
log.info("特征池删除操作完成:[{}],FlushPool:[{}]", poolId, flushPool);
log.info("特征池删除完成:[{}],FlushPool:[{}]", poolId, flushPool);
return ResponseVo.success(rid);
} catch (ElasticsearchException e) {
if (e.status() == 404) {
......@@ -192,7 +192,7 @@ public class PoolService {
return ResponseVo.error(rid, bulkItemResponses.items().toString());
}
log.info("特征池修改操作完成:[{}],updateType:[{}]", poolId, updateType);
log.info("特征池修改:[{}],updateType:[{}]", poolId, updateType);
return ResponseVo.success(rid, "success");
} catch (ElasticsearchException e) {
log.error("modifyPool", e);
......@@ -214,7 +214,7 @@ public class PoolService {
String poolId = requestVo.getPoolId();
try {
List<PoolInfo> poolInfos;
log.info("查询特征池操作开始:[{}],rid:[{}]", poolId, rid);
// log.info("查询特征池操作开始:[{}],rid:[{}]", poolId, rid);
if (listAll != 0) {
poolInfos = queryPoolInfo(poolId);
......@@ -226,7 +226,7 @@ public class PoolService {
}
ResponseVo success = ResponseVo.success(rid, "success");
success.setPoolIds(poolInfos);
log.info("查询特征池操作完成:[{}],rid:[{}]", poolId, rid);
log.info("查询特征池完成:[{}],rid:[{}]", poolId, rid);
return success;
} catch (ElasticsearchException e) {
......@@ -238,7 +238,7 @@ public class PoolService {
public void refreshPool(String... poolIds) throws IOException {
RefreshRequest refreshRequest = new RefreshRequest.Builder().index(Arrays.asList(poolIds)).build();
RefreshResponse refresh = client.indices().refresh(refreshRequest);
log.info("刷新索引:{},成功:{},失败:{}", poolIds, refresh.shards().successful(), refresh.shards().failed());
// log.info("刷新索引:{},成功:{},失败:{}", poolIds, refresh.shards().successful(), refresh.shards().failed());
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!