| | |
| | | }, |
| | | }, |
| | | }, |
| | | "pic_date": map[string]interface{}{ // 新增按 documentNumber 聚合 |
| | | "terms": map[string]interface{}{ |
| | | "field": "picDate", |
| | | "size": 10000, |
| | | }, |
| | | }, |
| | | "document_numbers": map[string]interface{}{ // 新增按 documentNumber 聚合 |
| | | "terms": map[string]interface{}{ |
| | | "field": "documentNumber", |
| | |
| | | persons = append(persons, docNumBucket.(map[string]interface{})["key"].(string)) |
| | | } |
| | | } |
| | | |
| | | var PicDate string |
| | | if docNumBuckets, ok := floorBucket.(map[string]interface{})["pic_data"].(map[string]interface{})["buckets"].([]interface{}); ok { |
| | | for _, docNumBucket := range docNumBuckets { |
| | | PicDate = docNumBucket.(map[string]interface{})["key"].(string) |
| | | } |
| | | } |
| | | logger.Debugf("floor, persons--,appearCount------------------------------------- %s-- %s --", floor, persons, appearCount) |
| | | record := &LocationRecord{ |
| | | //PicDate: timestamp, |
| | | PicDate: PicDate, |
| | | DocumentNumbers: persons, |
| | | CommunityId: communityId, |
| | | Building: building, |