Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query node: sort forum posts search result by relevance #2608

Open
thesan opened this issue Sep 2, 2021 · 6 comments
Open

Query node: sort forum posts search result by relevance #2608

thesan opened this issue Sep 2, 2021 · 6 comments

Comments

@thesan
Copy link
Member

thesan commented Sep 2, 2021

➕ 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

@ondratra
Copy link
Contributor

ondratra commented Sep 14, 2021

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 Joystream/hydra#455. Also, I have an impression that we will want to include forum posts' texts in multiple fulltext searches -> that's the goal of Joystream/hydra#457.

@thesan
Copy link
Member Author

thesan commented Sep 14, 2021

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.

@bedeho
Copy link
Member

bedeho commented Dec 12, 2021

Is this still an issue?

@thesan thesan changed the title Pioneer query to search forum posts Query node: sort forum posts search result by relevance Dec 22, 2021
@thesan
Copy link
Member Author

thesan commented Dec 22, 2021

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.

@bedeho
Copy link
Member

bedeho commented Dec 22, 2021

Ok, adding it to Oylmpia scope, hopefully we can make a decision there.

@dmtrjsg dmtrjsg assigned ondratra and unassigned Lezek123 Jan 12, 2022
@dmtrjsg
Copy link

dmtrjsg commented Jan 12, 2022

@ondratra assigning to you mate as per our agreement from Monday ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants