aboutsummaryrefslogtreecommitdiff
path: root/schema.sql
diff options
context:
space:
mode:
authorFelix Hanley <felix@userspace.com.au>2017-06-18 06:25:57 +0000
committerFelix Hanley <felix@userspace.com.au>2017-06-18 06:25:57 +0000
commit2829872a9223aefeb5f3ad7c8fe198e0ff6dc523 (patch)
tree58aa1b31152a87ef16f729fe9cddda0f4e22397e /schema.sql
parent30fc93f11537789824eeb24bde212a57e43ecb01 (diff)
downloaddhtsearch-2829872a9223aefeb5f3ad7c8fe198e0ff6dc523.tar.gz
dhtsearch-2829872a9223aefeb5f3ad7c8fe198e0ff6dc523.tar.bz2
Add full text search via PostgreSQL
Diffstat (limited to 'schema.sql')
-rw-r--r--schema.sql4
1 files changed, 3 insertions, 1 deletions
diff --git a/schema.sql b/schema.sql
index 62ecd66..5ab895c 100644
--- a/schema.sql
+++ b/schema.sql
@@ -3,8 +3,10 @@ create table if not exists torrents (
infohash character varying(40) unique,
size bigint,
name text,
- seen timestamp with time zone
+ seen timestamp with time zone,
+ tsv tsvector
);
+create index tsv_idx on torrents using gin(tsv);
create table if not exists files (
id serial not null primary key,
torrent_id integer not null references torrents on delete cascade,