diff --git a/routers/search.go b/routers/search.go index 7fbe42ff3..6c8998a40 100644 --- a/routers/search.go +++ b/routers/search.go @@ -772,7 +772,7 @@ func searchIssue(ctx *context.Context, TableName string, Key string, Page int, P resultObj.PrivateTotal = count issuesSize := len(issues) if issuesSize > 0 { - log.Info("Query private repo issue number is:" + fmt.Sprint(issuesSize)) + log.Info("Query private repo issue number is:" + fmt.Sprint(issuesSize) + " count=" + fmt.Sprint(count)) makePrivateIssueOrPr(issues, resultObj, Key) } else { log.Info("not found private repo issue,keyword=" + Key) @@ -814,7 +814,9 @@ func searchIssue(ctx *context.Context, TableName string, Key string, Page int, P searchJson, _ := json.Marshal(res) log.Info("searchJson=" + string(searchJson)) esresult := makeIssueResult(res, Key, OnlyReturnNum) + resultObj.Total = resultObj.PrivateTotal + esresult.Total + log.Info("query issue es count=" + fmt.Sprint(esresult.Total) + " total=" + fmt.Sprint(resultObj.Total)) resultObj.Result = append(resultObj.Result, esresult.Result...) ctx.JSON(200, resultObj) } else {