LP#
1549505: Scale popularity adjustment to relevance differently
From code comments:
$max_mult below is the value of the newly introduced global flag
called search.max_popularity_importance_multiplier.
$adjusted_scale below is the converted badge score scaling value
after accounting for the administrator-supplied $max_mult value.
This will cale the 0-5 effect of popularity badges by providing a
divisor for the badge average that is the inverse of the maximum
multiplier. Two examples, comparing the effect to the default
$max_mult value of 2.0, which causes a $adjusted_scale value
of 5.0:
* Given a $max_mult of 1.1, the value of $adjusted_scale
will be 50.0, meaning that the average badge value will be
/divided/ by 50.0 rather than 5.0, then added to 1.0 and
used as a multiplier against the base relevance. Thus a
change of at most 10% to the base relevance for a record
with a 5.0 average badge score. This will allow records
that are naturally very relevant to avoid being pushed
below badge-heavy records.
* Given a $max_mult of 3.0, the value of $adjusted_scale
will be 2.5, meaning that the average badge value will be
/divided/ by 2.5 rather than 5.0, then added to 1.0 and
used as a multiplier against the base relevance. Thus a
change of as much as 200% to (or three times the size of)
the base relevance for a record with a 5.0 average badge
score. This in turn will cause badges to outweigh
relevance to a very large degree.
Signed-off-by: Mike Rylander <mrylander@gmail.com>