Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grégoire Locqueville
haskell-gargantext
Commits
e72defce
Commit
e72defce
authored
Sep 28, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[search_title] tsvector query fix for v11
Also, pin postgres to v11 so that we're compatible with Debian upstream.
parent
76279305
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
docker-compose.yaml
devops/docker/docker-compose.yaml
+2
-1
schema.sql
devops/postgres/schema.sql
+3
-3
No files found.
devops/docker/docker-compose.yaml
View file @
e72defce
...
@@ -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
...
...
devops/postgres/schema.sql
View file @
e72defce
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment