From 79546715a1bed2da02250acadd02520097d719b0 Mon Sep 17 00:00:00 2001 From: Azareal Date: Fri, 21 Feb 2020 09:48:09 +1000 Subject: [PATCH] add missing fulltext keys to installer --- cmd/query_gen/main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/query_gen/main.go b/cmd/query_gen/main.go index 447b698d..0d43a1b7 100644 --- a/cmd/query_gen/main.go +++ b/cmd/query_gen/main.go @@ -69,6 +69,7 @@ func writeStatements(a qgen.Adapter) (err error) { } type si = map[string]interface{} +type tK = tblKey func seedTables(a qgen.Adapter) error { qgen.Install.AddIndex("topics", "parentID", "parentID") @@ -79,6 +80,10 @@ func seedTables(a qgen.Adapter) error { qgen.Install.AddIndex("attachments", "originID", "originID") qgen.Install.AddIndex("attachments", "path", "path") qgen.Install.AddIndex("activity_stream_matches", "watcher", "watcher") + // TODO: Remove these keys to save space when Elasticsearch is active? + qgen.Install.AddKey("topics", "title", tK{"title", "fulltext", "", false}) + qgen.Install.AddKey("topics", "content", tK{"content", "fulltext", "", false}) + qgen.Install.AddKey("replies", "content", tK{"content", "fulltext", "", false}) qgen.Install.SimpleInsert("sync", "last_update", "UTC_TIMESTAMP()") qgen.Install.SimpleInsert("settings", "name, content, type, constraints", "'activation_type','1','list','1-3'")