Skip to content

Instantly share code, notes, and snippets.

@steinar
Created January 8, 2015 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steinar/f907fc3638fa3aaedcf3 to your computer and use it in GitHub Desktop.
Save steinar/f907fc3638fa3aaedcf3 to your computer and use it in GitHub Desktop.

This PR improves the feed ranking algorithm

Main changes

  • Shorter time decay factor in 2nd phase, 12h instead of 24h.
  • "Fresh" stories (new since last feed generation) receive a modest boost of 1.2.
    • Date stored in redis_stream
  • Adding manual "boost" for individual events.
  • Posts created for player are massively boosted for 120 seconds.
  • Hotness part updated.
    • Comments don't count (Tackles Hannes-syndome).
    • Single log instead of two.
    • Adding +10 before doing log to round of initial jump. This also results in 0 likes = 1.
  • Adding debug information to all feeds under the "_rank" attributes.
    • I've discussed this with all client teams - should not affect them.

Tests

  • I've made sure all tests pass.
  • Full coverage is maintained.

Review

  • Sanity check
  • Picture how the formula will work

Reviewer: @gkristjansson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment