1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 10:18:38 +00:00

Sort issue search results by revelance (#14353)

This commit is contained in:
Lauris BH
2021-01-16 06:55:17 +02:00
committed by GitHub
parent 2db4733c7d
commit 0a3c3357f3
5 changed files with 6 additions and 5 deletions

View File

@@ -1682,7 +1682,7 @@ func SearchIssueIDsByKeyword(kw string, repoIDs []int64, limit, start int) (int6
)
var ids = make([]int64, 0, limit)
err := x.Distinct("id").Table("issue").Where(cond).Limit(limit, start).Find(&ids)
err := x.Distinct("id").Table("issue").Where(cond).OrderBy("`updated_unix` DESC").Limit(limit, start).Find(&ids)
if err != nil {
return 0, nil, err
}