|
@@ -1261,6 +1261,12 @@ func (e *EsV1) GetAggs(index, itype, query string) (aggs Aggregations, count int
|
|
|
if parseErr == nil && hit.Highlight != nil && res[i] != nil {
|
|
|
res[i]["highlight"] = map[string][]string(hit.Highlight)
|
|
|
}
|
|
|
+ if hit.Source != nil && res[i] != nil {
|
|
|
+ data := map[string]interface{}{}
|
|
|
+ dataByte, _ := hit.Source.MarshalJSON()
|
|
|
+ json.Unmarshal(dataByte, &data)
|
|
|
+ res[i]["source"] = data
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
log.Println("查询结果太多,查询到:", resNum, "条")
|