aboutsummaryrefslogtreecommitdiffstats
path: root/db/schema_0073-add-full-text-search-index.sql
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2021-10-07 13:32:40 +0200
committerMarius Halden <marius.h@lden.org>2021-10-07 13:32:40 +0200
commit09dacfc6b8bf62addeee16c20b1d90c2a256da96 (patch)
tree7caa2bf9e92227ab74448f9b746dd28bbcb81b2a /db/schema_0073-add-full-text-search-index.sql
parent585e57484f9c6332668bf1ac0a6a3b39dbe32223 (diff)
parentcea89fb87a96943708a1db0f646492fbfaaf000f (diff)
Merge tag 'v3.1' into fiksgatami-devfiksgatami-dev
Diffstat (limited to 'db/schema_0073-add-full-text-search-index.sql')
-rw-r--r--db/schema_0073-add-full-text-search-index.sql13
1 files changed, 13 insertions, 0 deletions
diff --git a/db/schema_0073-add-full-text-search-index.sql b/db/schema_0073-add-full-text-search-index.sql
new file mode 100644
index 000000000..9871386bd
--- /dev/null
+++ b/db/schema_0073-add-full-text-search-index.sql
@@ -0,0 +1,13 @@
+CREATE INDEX CONCURRENTLY problem_fulltext_idx ON problem USING GIN(
+ to_tsvector(
+ 'DB_FULL_TEXT_SEARCH_CONFIG',
+ translate(id || ' ' || coalesce(external_id,'') || ' ' || coalesce(bodies_str,'') || ' ' || name || ' ' || title || ' ' || detail, '/.', ' ')
+ )
+);
+
+CREATE INDEX CONCURRENTLY comment_fulltext_idx on comment USING GIN(
+ to_tsvector(
+ 'DB_FULL_TEXT_SEARCH_CONFIG',
+ translate(id || ' ' || problem_id || ' ' || coalesce(name,'') || ' ' || text, '/.', ' ')
+ )
+);