fix precedence of op for not full hot sort (#1564)
This commit is contained in:
parent
d06f4ae70d
commit
c31cf97288
|
@ -115,11 +115,11 @@ const orderByClause = (by, me, models, type) => {
|
|||
}
|
||||
|
||||
export function orderByNumerator ({ models, commentScaler = 0.5, considerBoost = false }) {
|
||||
return `(CASE WHEN "Item"."weightedVotes" - "Item"."weightedDownVotes" > 0 THEN
|
||||
return `((CASE WHEN "Item"."weightedVotes" - "Item"."weightedDownVotes" > 0 THEN
|
||||
GREATEST("Item"."weightedVotes" - "Item"."weightedDownVotes", POWER("Item"."weightedVotes" - "Item"."weightedDownVotes", 1.2))
|
||||
ELSE
|
||||
"Item"."weightedVotes" - "Item"."weightedDownVotes"
|
||||
END + "Item"."weightedComments"*${commentScaler}) + ${considerBoost ? `("Item".boost / ${BOOST_MULT})` : 0}`
|
||||
END + "Item"."weightedComments"*${commentScaler}) + ${considerBoost ? `("Item".boost / ${BOOST_MULT})` : 0})`
|
||||
}
|
||||
|
||||
export function joinZapRankPersonalView (me, models) {
|
||||
|
|
Loading…
Reference in New Issue