Rank by Integer Buckets
Description
Re-rank objects by the value of an integer property.
Every object's score is boosted proportionally to the size of the bucket it belongs to.
Buckets are defined as integer ranges of a given size.
For example, with values [0,2,3,9,10,12,50,70]
and bucket size 10, the following buckets are created:
[0,2,3,9]
[10,12]
[50]
[70]
and all items in bucket 1 will get a score boost 4 times as large as those in buckets 3 and 4
Input
SOURCE [OBJ,INTEGER]
: the list of objects to rank, with an associated integer value
Output
RESULT [OBJ,INTEGER]
: ranked objects
Parameters
Bucket size
: for each input integeri
, the resulting bucket identifier is given byi / Bucket size