Commit 8d1d7c9c authored by Alexandre Delanoë's avatar Alexandre Delanoë

Merge branch 'dev-ilike-search-fix' of...

Merge branch 'dev-ilike-search-fix' of ssh://gitlab.iscpif.fr:20022/gargantext/haskell-gargantext into dev-merge
parents 759d28f9 e72defce
......@@ -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