Commit 960aa686 by 李乾广

[chg]日志优化

1 parent ec549f78
...@@ -110,11 +110,11 @@ public class PersonService { ...@@ -110,11 +110,11 @@ public class PersonService {
List<BodyFeature> bodyFeatures = person.getBodyFeatures(); List<BodyFeature> bodyFeatures = person.getBodyFeatures();
Double[] feature = null; Double[] feature = null;
if (CollectionUtils.isEmpty(bodyFeatures) && null == person.getBodyMinScore()) { if (CollectionUtils.isEmpty(bodyFeatures) && null == person.getBodyMinScore()) {
log.info("CountMatchPerson人体特征为空并且最小分数为空,直接查数量,PoolIds:[{}],count:{}", poolIds, count); log.info("rid:{} CountMatchPerson人体特征为空并且最小分数为空,直接查数量,PoolIds:[{}],count:{}", rid, poolIds, count);
} else if (CollectionUtils.isNotEmpty(bodyFeatures)){ } else if (CollectionUtils.isNotEmpty(bodyFeatures)){
feature = bodyFeatures.get(0).getFeature(); feature = bodyFeatures.get(0).getFeature();
if (feature == null || feature.length < Constant.BODY_FEATURE_DIMS_2048) { if (feature == null || feature.length < Constant.BODY_FEATURE_DIMS_2048) {
log.info("人体特征维数小于2048,跳过比对"); log.info("rid:{} 人体特征维数小于2048,跳过比对", rid);
ResponseVo error = ResponseVo.error(rid, "人体特征维数小于2048,跳过比对"); ResponseVo error = ResponseVo.error(rid, "人体特征维数小于2048,跳过比对");
error.setCount(0); error.setCount(0);
return error; return error;
...@@ -126,7 +126,7 @@ public class PersonService { ...@@ -126,7 +126,7 @@ public class PersonService {
feature = Arrays.copyOfRange(feature, 3, Constant.BODY_FEATURE_DIMS_2048 + 3); feature = Arrays.copyOfRange(feature, 3, Constant.BODY_FEATURE_DIMS_2048 + 3);
} }
} else { } else {
log.info("参数错误"); log.info("rid:{} 参数错误", rid);
ResponseVo error = ResponseVo.error(rid, "参数错误"); ResponseVo error = ResponseVo.error(rid, "参数错误");
error.setCount(0); error.setCount(0);
return error; return error;
...@@ -136,7 +136,7 @@ public class PersonService { ...@@ -136,7 +136,7 @@ public class PersonService {
ValueCountAggregationBuilder countAggregationBuilder = AggregationBuilders.count("countId").field("_id"); ValueCountAggregationBuilder countAggregationBuilder = AggregationBuilders.count("countId").field("_id");
builder.aggregation(countAggregationBuilder); builder.aggregation(countAggregationBuilder);
request.source(builder); request.source(builder);
log.debug("CountMatchPerson条件{}:{}", indices, builder.toString()); log.debug("rid:{} CountMatchPerson条件{}:{}", rid, indices, builder.toString());
SearchResponse response = client.search(request, RequestOptions.DEFAULT); SearchResponse response = client.search(request, RequestOptions.DEFAULT);
ParsedValueCount countId = response.getAggregations().get("countId"); ParsedValueCount countId = response.getAggregations().get("countId");
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!