I need to rank a number of posts by their updated_at
timestamp but I need the rank to have some sort of exponential decay after the post has been updated 6 hours after created_at
until 2 weeks at which point it breaks even and doesn't change rank.
When the post is created, updated_at
is set to the timestamp as created_at
to kick-off sorting.
I looked at Hot content algorithm / score with time decay which is along the lines of what I'm looking for but I need the rank to have a precision similar to the updated_at
timestamp.
The reason I need this is so that posts which were created a while back yet updated recently won't be shown higher than posts that were recently created.