Skip to main content
August 2, 2011
Question

cfsearch scores related to date

  • August 2, 2011
  • 1 reply
  • 290 views

I'm setting up a search collection of news articles and want to return results by score, except that it would be good to change the weighting to score newer articles higher.  News from 5 years ago may not be as relevant as news from last week or last month.  I'm guessing there is nothing built-in for this.  So I can look into weighting the score.  But I was wondering if there is any good logic for doing this?

One thought was to round off the scores to the nearest integer, and then sort by score + date.  This would bump newer stories that have similar scores.  Or just bump the score a certain amount based on how new it is?  It may just need trial & error, but suggestions would be welcome.

This topic has been closed for replies.

1 reply

Inspiring
August 13, 2011

With the natie CF tools: no, not that I can think of.

However you might be able to do it directly with Solr.  Give this a read:

http://wiki.apache.org/solr/FunctionQuery#Date_Boosting

--

Adam