Revert "Exponential controversy rank (#4872)"

This reverts commit fd58b4f809.
This commit is contained in:
Felix Ableitner 2024-10-21 10:18:29 +02:00
parent 770e030982
commit 3a65d0490f
3 changed files with 1 additions and 35 deletions

View file

@ -8,7 +8,7 @@ CREATE FUNCTION r.controversy_rank (upvotes numeric, downvotes numeric)
0
ELSE
(
upvotes + downvotes) ^ CASE WHEN upvotes > downvotes THEN
upvotes + downvotes) * CASE WHEN upvotes > downvotes THEN
downvotes::float / upvotes::float
ELSE
upvotes::float / downvotes::float

View file

@ -1,17 +0,0 @@
UPDATE
post_aggregates
SET
controversy_rank = CASE WHEN downvotes <= 0
OR upvotes <= 0 THEN
0
ELSE
(upvotes + downvotes) * CASE WHEN upvotes > downvotes THEN
downvotes::float / upvotes::float
ELSE
upvotes::float / downvotes::float
END
END
WHERE
upvotes > 0
AND downvotes > 0;

View file

@ -1,17 +0,0 @@
UPDATE
post_aggregates
SET
controversy_rank = CASE WHEN downvotes <= 0
OR upvotes <= 0 THEN
0
ELSE
(upvotes + downvotes) ^ CASE WHEN upvotes > downvotes THEN
downvotes::float / upvotes::float
ELSE
upvotes::float / downvotes::float
END
END
WHERE
upvotes > 0
AND downvotes > 0;