Revised relevance algorithm.