This is a more advanced way of giving preference to recent items. In short, we give a large boost to new items, and that boost gradually goes down as the item ages. This is usually not needed because our machine learning system automatically infers attributes such as whether an item is trending or stale, based on user behavior. This inference is usually smarter than blind reliance on time since publication. For instance, an article published a long time ago that has become topically relevant recently can get picked up as trending.
If you would like us to activate this feature for you in order to try it out, please let us know!
If you simply want to not show items older than a certain age, see our instructions to show only recently added articles or items.
In order for us to be able to apply time decay, you need to include the published_time in the inventory items' metadata.
Time decay is controlled by two settings:
- timeDecayInitialScore - This is the initial score attached to an item that has just been published. Essentially, it determines how much importance the time-decayed score has in determining the ranking relative to the rest of the score. A very high score would be 10, a more moderate boost would be a 4 or 5.
- halfLifeInSeconds - This is the time (in seconds) that it takes for the score to be halved. As an example, if the half life is set to 7 days, then after 14 days the item would no longer receive a boost.
These settings can be implemented in three different ways:
- Globally: Tell us what you'd like the initial score and half life to be, and we'll implement a rule in our servers to include this as a default factor in our calculations for every item and query. You will need to contact LiftIgniter Support and request we set these values.
- Per Query: You can include the initial score and half life in the parameters sent with the request for recommendations. This allows you to control how important publishing recency is according to where the user is on the site. If the request is coming from the home page of your site, perhaps you want to strongly favor recent articles, but would rather let the natural rankings take over if they are on an article or category page. If these parameters are included in the query, it will override any globally set defaults.
- Per Item: Include the initial score and half life fields and values in an item's inventory metadata. This is very flexible as it allows you to set different items to decay at different rates. Items with specified values override both the global default and per-query settings in calculations.