减少传输耗时
This commit is contained in:
@@ -47,19 +47,19 @@ type Response struct {
|
||||
ID string `json:"_id"`
|
||||
Score float64 `json:"_score"`
|
||||
Timestamp string `json:"@timestamp"`
|
||||
Source struct {
|
||||
Timestamp string `json:"@timestamp"`
|
||||
Athlete string `json:"Athlete"`
|
||||
City string `json:"City"`
|
||||
Country string `json:"Country"`
|
||||
Discipline string `json:"Discipline"`
|
||||
Event string `json:"Event"`
|
||||
Gender string `json:"Gender"`
|
||||
Medal string `json:"Medal"`
|
||||
Season string `json:"Season"`
|
||||
Sport string `json:"Sport"`
|
||||
Year int `json:"Year"`
|
||||
} `json:"_source"`
|
||||
//Source struct {
|
||||
// Timestamp string `json:"@timestamp"`
|
||||
// Athlete string `json:"Athlete"`
|
||||
// City string `json:"City"`
|
||||
// Country string `json:"Country"`
|
||||
// Discipline string `json:"Discipline"`
|
||||
// Event string `json:"Event"`
|
||||
// Gender string `json:"Gender"`
|
||||
// Medal string `json:"Medal"`
|
||||
// Season string `json:"Season"`
|
||||
// Sport string `json:"Sport"`
|
||||
// Year int `json:"Year"`
|
||||
//} `json:"_source"`
|
||||
} `json:"hits"`
|
||||
} `json:"hits"`
|
||||
}
|
||||
@@ -148,7 +148,8 @@ func ZincSearch(query map[string]interface{}) (rest Response, err error) {
|
||||
log.Println("解析响应失败", err)
|
||||
return
|
||||
}
|
||||
return
|
||||
|
||||
return rest, err
|
||||
}
|
||||
|
||||
func ZincPut(data map[string]interface{}) (err error) {
|
||||
|
Reference in New Issue
Block a user