mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06: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 (
|
WITH top AS (
|
||||||
SELECT CASE
|
SELECT CASE
|
||||||
WHEN topics.created_at < :from THEN 0
|
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,
|
END AS score,
|
||||||
topic_id
|
topic_id
|
||||||
FROM top_topics
|
FROM top_topics
|
||||||
|
Loading…
Reference in New Issue
Block a user