From 06f7f23bab2113ba80f8fa863c8281a585ef822e Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 14 Apr 2018 22:10:43 +0200 Subject: fix(migrations): Change weighting of title vs. body After thinking for a little while I actually think the body of a post may be more relevant when searching for posts than the thread title. Right now this is just a hunch and we'll have to find out how it actually ends up working in real life. --- migrations/2018-04-14-170750_search-index/up.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'migrations') diff --git a/migrations/2018-04-14-170750_search-index/up.sql b/migrations/2018-04-14-170750_search-index/up.sql index ed997d3e041b..6b7d90eca63c 100644 --- a/migrations/2018-04-14-170750_search-index/up.sql +++ b/migrations/2018-04-14-170750_search-index/up.sql @@ -10,8 +10,8 @@ CREATE MATERIALIZED VIEW search_index AS t.id AS thread_id, t.title AS title, p.body AS body, - setweight(to_tsvector('english', t.title), 'A') || - setweight(to_tsvector('english', p.body), 'B') || + setweight(to_tsvector('english', t.title), 'B') || + setweight(to_tsvector('english', p.body), 'A') || setweight(to_tsvector('simple', t.author_name), 'C') || setweight(to_tsvector('simple', p.author_name), 'C') AS document FROM posts p -- cgit 1.4.1