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.
This commit is contained in:
parent
4132869277
commit
06f7f23bab
1 changed files with 2 additions and 2 deletions
|
@ -10,8 +10,8 @@ CREATE MATERIALIZED VIEW search_index AS
|
||||||
t.id AS thread_id,
|
t.id AS thread_id,
|
||||||
t.title AS title,
|
t.title AS title,
|
||||||
p.body AS body,
|
p.body AS body,
|
||||||
setweight(to_tsvector('english', t.title), 'A') ||
|
setweight(to_tsvector('english', t.title), 'B') ||
|
||||||
setweight(to_tsvector('english', p.body), 'B') ||
|
setweight(to_tsvector('english', p.body), 'A') ||
|
||||||
setweight(to_tsvector('simple', t.author_name), 'C') ||
|
setweight(to_tsvector('simple', t.author_name), 'C') ||
|
||||||
setweight(to_tsvector('simple', p.author_name), 'C') AS document
|
setweight(to_tsvector('simple', p.author_name), 'C') AS document
|
||||||
FROM posts p
|
FROM posts p
|
||||||
|
|
Loading…
Add table
Reference in a new issue