joystream
joystream copied to clipboard
Query node: sort forum posts search result by relevance
➕ we need sorting by relevance (based on full text searches) to support ticket for THIS ISSUE
The Pioneer design now has a global search for council, proposal, and forum posts @figma.
For the forum section, there should be a way to sort by relevance the result of a query to the ForumPost
which are filtered by thread title, post text and maybe later by tag.
┆Issue is synchronized with this Asana task by Unito
Filtering by the thread title, etc. should be possible already. For sorting by the relevance, we need to expose the calculated relevance value provided by PostgresSQL's ts_rank
. For that to work properly, we need to fix issues we are having with that function as described in https://github.com/Joystream/hydra/issues/455. Also, I have an impression that we will want to include forum posts' texts in multiple fulltext searches -> that's the goal of https://github.com/Joystream/hydra/issues/457.
Yes AFAIK the filtering part works well, I just meant the result should be sortable by relevance. Currently it's done temporarily on the frontend.
Is this still an issue?
Is this still an issue?
Yes. The aggregation is still done on the front-end. Currently at most 500 results (not necessarily the most relevant) are fetch from the query node then the data is aggregated on the front-end and finally 20 results are rendered in the search side bar.
Ok, adding it to Oylmpia
scope, hopefully we can make a decision there.
@ondratra assigning to you mate as per our agreement from Monday ;)