Phuks-co / throat

Open Source link aggregator and discussion platform powering Phuks
https://phuks.co
MIT License
73 stars 32 forks source link

Support custom hot sort functions defined in SQL #166

Closed happy-river closed 4 years ago

happy-river commented 4 years ago

When an instance has a lot of activity, the default sort of hot posts mostly shows the posts with the highest scores. This change allows an administrator to load a custom hot sort function defined in SQL into the database and use it for hot-sorting posts. A function defined in SQL will be faster than the default hot sort, because the database will be able to use caching and indexing on the calculated "hot" value.