mozilla / taar-lite

A lightweight version of the TAAR service intended for specific deployments with reduced feature visibility.
Mozilla Public License 2.0
2 stars 6 forks source link

Adds installation rate as a second sort parameter #17

Closed crankycoder closed 6 years ago

crankycoder commented 6 years ago

This should fix #3.

The add-on recommendations are now sorted primarily by weight, and total installation is used as a secondary index.

The installation number is currently not normalized, but that shouldn't matter in the context of sorting add-on recommendations.

Note that this relies on a JSON file generated in https://github.com/mozilla/python_mozetl/pull/225

crankycoder commented 6 years ago

I've formatted the weight as a 20 wide, 10 decimal number and postfixed another 10 digit zero padded number which is the number of installations of the add-on. This should break ties unless we somehow get equal weight and equal number of add-on installations.

We could add the guid itself to the sort key to always break ties, but this seems so unlikely that I don't think it will add any material benefit.