Commit 61765d02 by xmh

添加 unid 字段

1 parent 906d49b1
......@@ -62,7 +62,7 @@
<dependency>
<groupId>com.viontech.keliu</groupId>
<artifactId>AlgApiClient</artifactId>
<version>6.0.6-SNAPSHOT</version>
<version>6.0.8-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>javax</groupId>
......
......@@ -182,6 +182,7 @@ public class PersonService {
Integer bodyType = person.getBodyType();
String personChannelSerialNum = person.getChannelSerialNum();
List<FaceFeature> faceFeatures = person.getFaceFeatures();
String unid = person.getUnid();
if (faceFeatures != null && faceFeatures.size() > 0) {
for (FaceFeature faceFeature : faceFeatures) {
Double[] feature = faceFeature.getFeature();
......@@ -189,7 +190,7 @@ public class PersonService {
String fid = faceFeature.getFid();
IndexRequest indexRequest = new IndexRequest(poolId)
.source(XContentType.JSON, "personId", personId,
.source(XContentType.JSON, "personId", personId, "unid", unid,
"data", feature, "fid", fid, "age", age, "gender", gender, "body_type", bodyType,
"counttime", personCountTime == null ? null : Constant.DATE_FORMAT.get().format(personCountTime), "channelSerialNum", personChannelSerialNum);
bulkRequest.add(indexRequest);
......@@ -214,7 +215,7 @@ public class PersonService {
Date counttime = bodyFeature.getCounttime() == null ? personCountTime : bodyFeature.getCounttime();
String channelSerialNum = bodyFeature.getChannelSerialNum() == null ? personChannelSerialNum : person.getChannelSerialNum();
IndexRequest indexRequest = new IndexRequest(poolId)
.source(XContentType.JSON, "personId", personId,
.source(XContentType.JSON, "personId", personId,"unid", unid,
"body", feature, "fid", fid, "age", age, "gender", gender, "body_type", bodyType,
"counttime", counttime == null ? null : Constant.DATE_FORMAT.get().format(counttime), "channelSerialNum", channelSerialNum);
bulkRequest.add(indexRequest);
......
......@@ -234,6 +234,13 @@ public class PoolService {
}
builder.endObject();
// 抓拍id
builder.startObject("unid");
{
builder.field("type", "keyword");
}
builder.endObject();
// 特征id
builder.startObject("fid");
{
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!