Uses simple dictionary for names

This commit is contained in:
Mouse Reeve 2021-06-24 10:01:07 -07:00
parent adb0253abf
commit 04c51a6598

View file

@ -42,7 +42,7 @@ class Migration(migrations.Migration):
setweight(to_tsvector('pg_catalog.english', coalesce(new.title, '')), 'A') || setweight(to_tsvector('pg_catalog.english', coalesce(new.title, '')), 'A') ||
setweight(to_tsvector('pg_catalog.english', coalesce(new.subtitle, '')), 'B') || setweight(to_tsvector('pg_catalog.english', coalesce(new.subtitle, '')), 'B') ||
setweight(to_tsvector('pg_catalog.english', coalesce(new.series, '')), 'D') || setweight(to_tsvector('pg_catalog.english', coalesce(new.series, '')), 'D') ||
(SELECT setweight(to_tsvector('pg_catalog.english', coalesce(array_to_string(array_agg(bookwyrm_author.name), ' '), '')), 'C') (SELECT setweight(to_tsvector('simple', coalesce(array_to_string(array_agg(bookwyrm_author.name), ' '), '')), 'C')
FROM bookwyrm_book FROM bookwyrm_book
LEFT OUTER JOIN bookwyrm_book_authors LEFT OUTER JOIN bookwyrm_book_authors
ON bookwyrm_book.id = bookwyrm_book_authors.book_id ON bookwyrm_book.id = bookwyrm_book_authors.book_id