mirror of
https://github.com/discourse/discourse.git
synced 2025-03-21 01:35:37 +08:00
FIX: change top score formula
Adds more weight to `likes` (it's now the same weight as `post_count`)
This commit is contained in:
parent
feb0a42d87
commit
7edb88a5a8
@ -119,7 +119,7 @@ class TopTopic < ActiveRecord::Base
|
||||
WITH top AS (
|
||||
SELECT CASE
|
||||
WHEN topics.created_at < :from THEN 0
|
||||
ELSE log(greatest(#{period}_views_count, 1)) + #{period}_likes_count + #{period}_posts_count * 2
|
||||
ELSE log(greatest(#{period}_views_count, 1)) + #{period}_likes_count * 2 + #{period}_posts_count * 2
|
||||
END AS score,
|
||||
topic_id
|
||||
FROM top_topics
|
||||
|
Loading…
x
Reference in New Issue
Block a user