summaryrefslogtreecommitdiffstats
path: root/routers/home.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/home.go')
-rw-r--r--routers/home.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/home.go b/routers/home.go
index 50e1a2b2a4..4d4bfa5620 100644
--- a/routers/home.go
+++ b/routers/home.go
@@ -12,8 +12,8 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
+ code_indexer "code.gitea.io/gitea/modules/indexer/code"
"code.gitea.io/gitea/modules/log"
- "code.gitea.io/gitea/modules/search"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/util"
"code.gitea.io/gitea/routers/user"
@@ -312,7 +312,7 @@ func ExploreCode(ctx *context.Context) {
var (
total int
- searchResults []*search.Result
+ searchResults []*code_indexer.Result
)
// if non-admin login user, we need check UnitTypeCode at first
@@ -334,14 +334,14 @@ func ExploreCode(ctx *context.Context) {
ctx.Data["RepoMaps"] = rightRepoMap
- total, searchResults, err = search.PerformSearch(repoIDs, keyword, page, setting.UI.RepoSearchPagingNum)
+ total, searchResults, err = code_indexer.PerformSearch(repoIDs, keyword, page, setting.UI.RepoSearchPagingNum)
if err != nil {
ctx.ServerError("SearchResults", err)
return
}
// if non-login user or isAdmin, no need to check UnitTypeCode
} else if (ctx.User == nil && len(repoIDs) > 0) || isAdmin {
- total, searchResults, err = search.PerformSearch(repoIDs, keyword, page, setting.UI.RepoSearchPagingNum)
+ total, searchResults, err = code_indexer.PerformSearch(repoIDs, keyword, page, setting.UI.RepoSearchPagingNum)
if err != nil {
ctx.ServerError("SearchResults", err)
return