FEATURE: improvements to hot algorithm (#25295)

- Decrease gravity, we come in too hot prioritizing too many new topics
- Remove all muted topics / categories and tags from the hot list
- Punish topics with zero likes in algorithm
This commit is contained in:
Sam
2024-01-17 16:12:03 +11:00
committed by GitHub
parent 54e6c1d823
commit df8bb947b2
5 changed files with 49 additions and 16 deletions

View File

@@ -340,6 +340,9 @@ class TopicQuery
def list_hot
create_list(:hot, unordered: true) do |topics|
topics = remove_muted_topics(topics, user)
topics = remove_muted_categories(topics, user, exclude: options[:category])
TopicQuery.remove_muted_tags(topics, user, options)
topics.joins("JOIN topic_hot_scores on topics.id = topic_hot_scores.topic_id").order(
"topic_hot_scores.score DESC",
)