Browse Source

Minor indexing configuration fixes

Achilleas Koutsou 6 years ago
parent
commit
ed9cfee4c4
3 changed files with 3 additions and 10 deletions
  1. 1 0
      models/models_gin.go
  2. 2 2
      pkg/setting/setting.go
  3. 0 8
      routes/search.go

+ 1 - 0
models/models_gin.go

@@ -17,6 +17,7 @@ import (
 // for a repository.
 func StartIndexing(user, owner *User, repo *Repository) {
 	if !setting.Search.Do {
+		log.Trace("Indexing not enabled")
 		return
 	}
 	var ireq struct{ RepoID, RepoPath string }

+ 2 - 2
pkg/setting/setting.go

@@ -332,8 +332,8 @@ var (
 
 	Search struct {
 		Do        bool
-		IndexURL  string
-		SearchURL string
+		IndexURL  string `ini:"INDEX_URL"`
+		SearchURL string `ini:"SEARCH_URL"`
 	}
 
 	DOI struct {

+ 0 - 8
routes/search.go

@@ -107,11 +107,3 @@ func ExploreCommits(c *context.Context) {
 	c.Data["Commits"] = res.Commits
 	c.HTML(200, EXPLORE_COMMITS)
 }
-
-type SearchRequest struct {
-	Token  string
-	CsrfT  string
-	UserID int64
-	Query  string
-	SType  int64
-}