Browse Source

[GinS] Gin search configuration options

cgars 7 years ago
parent
commit
625c65836f
2 changed files with 4 additions and 1 deletions
  1. 2 1
      conf/app.ini
  2. 2 0
      pkg/setting/setting.go

+ 2 - 1
conf/app.ini

@@ -520,7 +520,8 @@ pt-PT = pt
 
 [search]
 DO = false
-INDEX_URL = localhost/search
+INDEX_URL = localhost/index
+SEACH_URL = localhost/search
 
 ; Extension mapping to highlight class
 ; e.g. .toml=ini

+ 2 - 0
pkg/setting/setting.go

@@ -693,6 +693,8 @@ func NewContext() {
 		log.Fatal(2, "Failed to map API settings: %v", err)
 	} else if err = Cfg.Section("ui").MapTo(&UI); err != nil {
 		log.Fatal(2, "Fail to map UI settings: %v", err)
+	} else if err = Cfg.Section("search").MapTo(&Search); err != nil {
+		log.Fatal(2, "Fail to map Search settings: %v", err)
 	}
 
 	if Mirror.DefaultInterval <= 0 {