mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05: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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue