summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2017-06-14 12:36:10 -0700
committerGitHub <noreply@github.com>2017-06-14 12:36:10 -0700
commitf4c5d79810352d42ebcab92b52e7c53b9bc782b3 (patch)
tree817b9e91f8260419d41a86e26337f2ea21779c92 /system
parent81e1682818b96851a98426de89cbc31441049b24 (diff)
parent6b1f2a6838a931780abd0203291190221a66d395 (diff)
Merge pull request #164 from ponzu-cms/ponzu-dev
[core] remove code duplication from InitSearchIndex commit
Diffstat (limited to 'system')
-rw-r--r--system/db/init.go14
1 files changed, 1 insertions, 13 deletions
diff --git a/system/db/init.go b/system/db/init.go
index 4f35bbc..48ae641 100644
--- a/system/db/init.go
+++ b/system/db/init.go
@@ -84,23 +84,11 @@ func Init() {
if err != nil {
log.Fatalln("Failed to invalidate cache.", err)
}
-
- go func() {
- for t := range item.Types {
- err := search.MapIndex(t)
- if err != nil {
- log.Fatalln(err)
- return
- }
-
- SortContent(t)
- }
- }()
}
// InitSearchIndex initializes Search Index for search to be functional
// This was moved out of db.Init and put to main(), because addon checker was initializing db together with
-// search indexing initialisation in time when there were no item.Types defined so search index was always
+// search indexing initialisation in time when there were no item.Types defined so search index was always
// empty when using addons. We still have no guarentee whatsoever that item.Types is defined
// Should be called from a goroutine after SetContent is successful (SortContent requirement)
func InitSearchIndex() {