mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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:
@@ -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",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user