|
@@ -1217,6 +1217,9 @@ func (a *AnalysisEntity) ProjectTop10() (rMap map[string]interface{}, err error)
|
|
|
finalSql := fmt.Sprintf(a.GetCommonQuerySql(), queryTop10)
|
|
|
log.Println("ProjectTop10:", finalSql)
|
|
|
hits := elastic.Get(PtIndex, PtType, finalSql)
|
|
|
+ if hits == nil || len(*hits) == 0 {
|
|
|
+ return
|
|
|
+ }
|
|
|
rMap = map[string]interface{}{}
|
|
|
bArr := []map[string]interface{}{}
|
|
|
source := *hits
|