mirror of
https://github.com/mastodon/mastodon.git
synced 2024-09-18 19:40:41 +00:00
Remove extraneous greatest
from search score functions
This commit is contained in:
parent
c35ea59ee6
commit
ca6bee3b49
|
@ -15,15 +15,15 @@ module Account::Search
|
|||
|
||||
REPUTATION_SCORE_FUNCTION = <<~SQL.squish
|
||||
(
|
||||
greatest(0, coalesce(s.followers_count, 0)) / (
|
||||
greatest(0, coalesce(s.following_count, 0)) + 1.0
|
||||
coalesce(s.followers_count, 0) / (
|
||||
coalesce(s.following_count, 0) + 1.0
|
||||
)
|
||||
)
|
||||
SQL
|
||||
|
||||
FOLLOWERS_SCORE_FUNCTION = <<~SQL.squish
|
||||
log(
|
||||
greatest(0, coalesce(s.followers_count, 0)) + 2
|
||||
coalesce(s.followers_count, 0) + 2
|
||||
)
|
||||
SQL
|
||||
|
||||
|
|
Loading…
Reference in a new issue