summaryrefslogtreecommitdiffstats
path: root/routers/repo
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-12-23 20:31:16 +0800
committerGitHub <noreply@github.com>2019-12-23 20:31:16 +0800
commit89b4e0477b4e1b9e1cccd87b68fde4ea8a578e9c (patch)
tree46141746472fc33dfa8c262fa96176895bc9fba8 /routers/repo
parent2f9564f993ba02ba503d7088eb8cc70536b7a6df (diff)
downloadgitea-89b4e0477b4e1b9e1cccd87b68fde4ea8a578e9c.tar.gz
gitea-89b4e0477b4e1b9e1cccd87b68fde4ea8a578e9c.zip
Refactor code indexer (#9313)
* Refactor code indexer * fix test * fix test * refactor code indexer * fix import * improve code * fix typo * fix test and make code clean * fix lint
Diffstat (limited to 'routers/repo')
-rw-r--r--routers/repo/search.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/search.go b/routers/repo/search.go
index de16eda83d..50a92c1e36 100644
--- a/routers/repo/search.go
+++ b/routers/repo/search.go
@@ -10,7 +10,7 @@ import (
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
- "code.gitea.io/gitea/modules/search"
+ code_indexer "code.gitea.io/gitea/modules/indexer/code"
"code.gitea.io/gitea/modules/setting"
)
@@ -27,7 +27,7 @@ func Search(ctx *context.Context) {
if page <= 0 {
page = 1
}
- total, searchResults, err := search.PerformSearch([]int64{ctx.Repo.Repository.ID},
+ total, searchResults, err := code_indexer.PerformSearch([]int64{ctx.Repo.Repository.ID},
keyword, page, setting.UI.RepoSearchPagingNum)
if err != nil {
ctx.ServerError("SearchResults", err)