From 82d73c6e31b43925485a8722843df1b81f0d2545 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Wed, 13 Jul 2022 10:13:54 +0200 Subject: [PATCH] schema: use rum index https://github.com/postgrespro/rum --- schema.sql | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/schema.sql b/schema.sql index 3c7450c..bb1e423 100644 --- a/schema.sql +++ b/schema.sql @@ -1,6 +1,6 @@ CREATE TABLE domain ( id integer PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, - hostname text NOT NULL, + hostname text NOT NULL UNIQUE, authoritative boolean NOT NULL, tags text[] NOT NULL, exclusion_patterns text[] NOT NULL DEFAULT '{}', @@ -24,4 +24,6 @@ CREATE TABLE page ( excerpt text ); -CREATE INDEX idx_page_content ON page USING GIN (fts_vector); +CREATE EXTENSION rum; + +CREATE INDEX idx_page_content ON page USING RUM (fts_vector rum_tsvector_ops);