13 likes
·
26.1K reads
3 comments
·Feb 3, 2022
Feb 3, 2022
seems like ts_rank(to_tsvector(courses.title), query)
can give 1e-20
which will not be cast to null. This was causing poor ranking as 1e-20
results are brought to the top
·
·Aug 11, 2022
Aug 11, 2022
Thank you for the simple and easy to understand post. Is the query still performant with the use of the similarity function?
·
·Mar 13, 2023
Mar 13, 2023
One thing to note is you'll likely need/want to concatenate the columns you want to search across like this:
to_tsvector(courses.title || ' ' || courses.description)
·