zhaoqingang
2025-02-08 f60d06a3269772904eae05cac266faead0330764
测试 场景分析 bug
1个文件已修改
10 ■■■■■ 已修改文件
models/locationAnalysis.go 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
models/locationAnalysis.go
@@ -419,6 +419,14 @@
        "size": 0,
    }
    query = map[string]interface{}{
        "query": map[string]interface{}{
            "bool": map[string]interface{}{
                "filter": filters,
            },
        },
        "size": 10000,
    }
    if err := json.NewEncoder(&buf).Encode(query); err != nil {
        return nil, fmt.Errorf("error encoding query: %s", err)
    }
@@ -445,7 +453,7 @@
    if err := json.NewDecoder(res.Body).Decode(&result); err != nil {
        return nil, fmt.Errorf("error parsing response body: %s", err)
    }
    logger.Debugf("ressss--------------------------------------- %s", result)
    // 解析聚合结果
    var records []*LocationRecord
    if aggs, ok := result["aggregations"].(map[string]interface{}); ok {