Needs review
Project:
Search Score Improvements
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
7 Aug 2008 at 03:06 UTC
Updated:
20 Aug 2008 at 06:30 UTC
We discussed this before, we need to come up with proper normalization for recency scoring - both for d6 and d7.
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.