| | |
| | | }, |
| | | "picDate": map[string]interface{}{ // 新增按 picDate 聚合 |
| | | "date_histogram": map[string]interface{}{ |
| | | "field": "picDate", |
| | | "interval": "1d", // 按天聚合 |
| | | "time_zone": "+08:00", // 设置时区 |
| | | "field": "picDate", |
| | | //"interval": "1d", // 按天聚合 |
| | | //"time_zone": "+08:00", // 设置时区 |
| | | }, |
| | | }, |
| | | }, |
| | |
| | | if floorBuckets, ok := locationBucket.(map[string]interface{})["floor"].(map[string]interface{})["buckets"].([]interface{}); ok { |
| | | for _, floorBucket := range floorBuckets { |
| | | floor := floorBucket.(map[string]interface{})["key"].(string) |
| | | logger.Debugf("floor--------------------------------------- %s -----%s ", floor, floorBucket) |
| | | //logger.Debugf("floor--------------------------------------- %s -----%s ", floor, floorBucket) |
| | | appearCount := floorBucket.(map[string]interface{})["doc_count"].(float64) |
| | | //logger.Debugf("appearCount--------------------------------------- %s- --", appearCount) |
| | | // 构建 LocationRecord 结构体 |