Fixes search query syntax
mad about the lack of django docs on this, jeez
This commit is contained in:
parent
789f823d5d
commit
6470033ac9
3 changed files with 5 additions and 4 deletions
|
@ -44,7 +44,7 @@ class Migration(migrations.Migration):
|
|||
setweight(to_tsvector('simple', coalesce(new.title, '')), 'A')
|
||||
) ||
|
||||
setweight(to_tsvector('english', coalesce(new.subtitle, '')), 'B') ||
|
||||
(SELECT setweight(to_tsvector('simple', coalesce(array_to_string(array_agg(bookwyrm_author.name), ' '), '')), 'B')
|
||||
(SELECT setweight(to_tsvector('simple', coalesce(array_to_string(array_agg(bookwyrm_author.name), ' '), '')), 'C')
|
||||
FROM bookwyrm_book
|
||||
LEFT OUTER JOIN bookwyrm_book_authors
|
||||
ON bookwyrm_book.id = bookwyrm_book_authors.book_id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue