By default search results are sorted using "Top all time", which means that most upvoted items are shown first. So relevant results with less upvotes can actually be buried further down.
There is a Postgres function ts_rank to help with this sorting. However it seems to require an extra tsvector column in the searched data.
References:
https://dev.to/tdournet/how-to-optimise-postgresql-like-and-ilike-queries-494i
https://stackoverflow.com/questions/12933805/best-way-to-use-postgresql-full-text-search-ranking?rq=4
By default search results are sorted using "Top all time", which means that most upvoted items are shown first. So relevant results with less upvotes can actually be buried further down.
There is a Postgres function
ts_rankto help with this sorting. However it seems to require an extratsvectorcolumn in the searched data.References:
https://dev.to/tdournet/how-to-optimise-postgresql-like-and-ilike-queries-494i
https://stackoverflow.com/questions/12933805/best-way-to-use-postgresql-full-text-search-ranking?rq=4