Skip to content

Commit 060c9a8

Browse files
committed
try workaround
1 parent 560744f commit 060c9a8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

models/issue.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1578,7 +1578,13 @@ func GetRepoIssueStats(repoID, uid int64, filterMode int, isPull bool) (numOpen
15781578

15791579
// SearchIssueIDsByKeyword search issues on database
15801580
func SearchIssueIDsByKeyword(kw string, repoIDs []int64, limit, start int) (int64, []int64, error) {
1581-
var repoCond = builder.In("repo_id", repoIDs)
1581+
var repoCond builder.Cond
1582+
for i := len(repoIDs); len(repoIDs) > maxIssueIDs; i -= maxIssueIDs {
1583+
repoCond = repoCond.Or(builder.In("repo_id", repoIDs[:maxIssueIDs]))
1584+
repoIDs = repoIDs[maxIssueIDs:]
1585+
}
1586+
repoCond = repoCond.Or(builder.In("repo_id", repoIDs))
1587+
15821588
var subQuery = builder.Select("id").From("issue").Where(repoCond)
15831589
var cond = builder.And(
15841590
repoCond,

0 commit comments

Comments
 (0)