Skip to content
Snippets Groups Projects
Commit 12e2b4a0 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Fixed the Readme

parent d5027cec
No related branches found
No related tags found
No related merge requests found
...@@ -12,20 +12,20 @@ Setting up search backends ...@@ -12,20 +12,20 @@ Setting up search backends
First, add a new column to the backlog table: First, add a new column to the backlog table:
```sql ```sql
ALTER TABLE public.backlog ADD COLUMN tsv tsvector; ALTER TABLE backlog ADD COLUMN tsv tsvector;
``` ```
Second, add the two new indices: Second, add the two new indices:
```sql ```sql
CREATE INDEX backlog_tsv_idx CREATE INDEX backlog_tsv_idx
ON public.backlog ON backlog
USING gin(tsv); USING gin(tsv);
``` ```
```sql ```sql
CREATE INDEX backlog_tsv_filtered_idx CREATE INDEX backlog_tsv_filtered_idx
ON public.backlog ON backlog
USING gin(tsv) USING gin(tsv)
WHERE (type & 23559) > 0; WHERE (type & 23559) > 0;
``` ```
...@@ -35,14 +35,14 @@ Third, set up a trigger to populate the `tsv` column: ...@@ -35,14 +35,14 @@ Third, set up a trigger to populate the `tsv` column:
```sql ```sql
CREATE TRIGGER tsvectorupdate CREATE TRIGGER tsvectorupdate
BEFORE INSERT OR UPDATE BEFORE INSERT OR UPDATE
ON public.backlog ON backlog
FOR EACH ROW FOR EACH ROW
EXECUTE PROCEDURE tsvector_update_trigger('tsv', 'pg_catalog.english', 'message'); EXECUTE PROCEDURE tsvector_update_trigger('tsv', 'pg_catalog.english', 'message');
``` ```
Fourth, populate the `tsv` column: Fourth, populate the `tsv` column:
```sql ```sql
UPDATE public.backlog SET public.backlog.messageid = public.backlog.messageid; UPDATE backlog SET backlog.messageid = backlog.messageid;
``` ```
Setting up the search Setting up the search
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment