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
...@@ -2,7 +2,8 @@ version: '3' ...@@ -2,7 +2,8 @@ version: '3'
services: services:
postgres: postgres:
image: 'postgres:latest' #image: 'postgres:latest'
image: 'postgres:11'
network_mode: host network_mode: host
#ports: #ports:
#- 5432:5432 #- 5432:5432
......
...@@ -38,9 +38,9 @@ CREATE TABLE public.nodes ( ...@@ -38,9 +38,9 @@ CREATE TABLE public.nodes (
FOREIGN KEY (user_id) REFERENCES public.auth_user(id) ON DELETE CASCADE FOREIGN KEY (user_id) REFERENCES public.auth_user(id) ON DELETE CASCADE
); );
ALTER TABLE public.nodes OWNER TO gargantua; ALTER TABLE public.nodes OWNER TO gargantua;
ALTER TABLE nodes ALTER TABLE nodes ADD COLUMN search_title tsvector;
ADD COLUMN search_title tsvector UPDATE nodes SET search_title = to_tsvector('english', coalesce("hyperdata"->>'title', '') || ' ' || coalesce("hyperdata"->>'abstract', ''));
GENERATED ALWAYS AS (to_tsvector('english', coalesce("hyperdata"->>'title', '') || ' ' || coalesce("hyperdata"->>'abstract', ''))) STORED; CREATE INDEX search_title_idx ON nodes USING GIN (search_title);
-------------------------------------------------------------- --------------------------------------------------------------
-- | Ngrams -- | 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