Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
Based on the graph above we are using the function plotted by the green line. 2.718 is an approximation to the value e. In our normalization equation our value for X becomes: (1 - GREATEST(n.created, n.changed) / %d)), where %d is the current unix timestamp.
This ensures that nodes created/changed at the same instance the search is done provides for maximum score potential from the recency ranking factor. As time passes since the node was updated or changed the score provided by this ranking factor will decay exponentially at the rate shown by the green line.
*** note: we do (1 - normalized time) so that nodes published most recently are closer to 0 on the x axis in the plot and vice versa, all the way until x = 1.
Comments
Comment #1
BlakeLucchesi commentedNormalization for node recency has been solved with the following equation:
based on the following graph: http://en.wikipedia.org/wiki/Image:Plot-exponential-decay.png (details on exponential decay: http://en.wikipedia.org/wiki/Exponential_decay)
Explanation:
Based on the graph above we are using the function plotted by the green line. 2.718 is an approximation to the value e. In our normalization equation our value for X becomes: (1 - GREATEST(n.created, n.changed) / %d)), where %d is the current unix timestamp.
This ensures that nodes created/changed at the same instance the search is done provides for maximum score potential from the recency ranking factor. As time passes since the node was updated or changed the score provided by this ranking factor will decay exponentially at the rate shown by the green line.
*** note: we do (1 - normalized time) so that nodes published most recently are closer to 0 on the x axis in the plot and vice versa, all the way until x = 1.