Skip to content

Commit e99ee8a

Browse files
committed
add comments
1 parent b68eda5 commit e99ee8a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

models/issues/issue.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,11 @@ func FindIssuesSuggestionByKeyword(ctx context.Context, repoID int64, keyword st
524524
if excludedID > 0 {
525525
cond = cond.And(builder.Neq{"`id`": excludedID})
526526
}
527+
528+
// It seems that GitHub searches both title and content (maybe sorting by the search engine's ranking system?)
529+
// The first PR (https://github.com/go-gitea/gitea/pull/32327) uses "search indexer" to search "name(title) + content"
530+
// But it seems that searching "content" (especially LIKE by DB engine) generates worse (unusable) results.
531+
// So now (https://github.com/go-gitea/gitea/pull/33538) it only searches "name(title)", leave the improvements to the future.
527532
cond = cond.And(db.BuildCaseInsensitiveLike("`name`", keyword))
528533

529534
issues := make([]*Issue, 0, pageSize)

0 commit comments

Comments
 (0)