-
Notifications
You must be signed in to change notification settings - Fork 198
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
feat: move space ranking to a table #855
Comments
This table should be updated on new activities (space edition, new vote), to update the popularity and an Then in parallel, we have a cron to refresh the popularity for spaces without activities in the current day, but with in the past 2 weeks (to decrease the popularity based on 7d votes activities) This table will columns
This table does not work alone, and will also need to be So all spaces queries can be sorted by popularity by default (if no sort order defined) with
For the counters, we could fetch that live with an additional SQL query |
We could, but we can't return it with a spaces query, it returns like this |
We will keep the ranking query, it will just pull data from a table instead of in memory object. Hub graphql api will remain the same, except that spaces have additional |
We can add a new column(s) on spaces table no? Why to create a separate table? 😄 |
We could yes. My original idea was to have the ranking table have more columns, but not needed for now |
Current ranking is currently in-memory, and can not be used together with
Space
to sort naturally sort all spaces by ranking, by default.By moving this ranking to a table, we could use
JOIN
when fetching spaces, and always sort spaces bypopularity DESC
if not sort filter is specified.This will also avoid the use of 2 queries when showing spaces on the v1 homepage, and v2 explore page
The text was updated successfully, but these errors were encountered: