Commit e72defce authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[search_title] tsvector query fix for v11

Also, pin postgres to v11 so that we're compatible with Debian
upstream.
parent 76279305
Pipeline #1893 passed with stage
in 38 minutes
......@@ -2,7 +2,8 @@ version: '3'
services:
postgres:
image: 'postgres:latest'
#image: 'postgres:latest'
image: 'postgres:11'
network_mode: host
#ports:
#- 5432:5432
......
......@@ -38,9 +38,9 @@ CREATE TABLE public.nodes (
FOREIGN KEY (user_id) REFERENCES public.auth_user(id) ON DELETE CASCADE
);
ALTER TABLE public.nodes OWNER TO gargantua;
ALTER TABLE nodes
ADD COLUMN search_title tsvector
GENERATED ALWAYS AS (to_tsvector('english', coalesce("hyperdata"->>'title', '') || ' ' || coalesce("hyperdata"->>'abstract', ''))) STORED;
ALTER TABLE nodes ADD COLUMN search_title tsvector;
UPDATE nodes SET search_title = to_tsvector('english', coalesce("hyperdata"->>'title', '') || ' ' || coalesce("hyperdata"->>'abstract', ''));
CREATE INDEX search_title_idx ON nodes USING GIN (search_title);
--------------------------------------------------------------
-- | Ngrams
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment