: similar. In my case, if I want to rank the most recent documents first
: (because it's about news), I have to use very large boost, which will
: end up getting the docs that are not so relevant to the top. I haven't

it sounds like you only attempted tweaking the boost value, and not 
tweaking the function params ... you can change the curve so that really 
new things get a large score increase, but older things get less of an 
increase.

: Ideally, I think it can be solved by doing a query for the past 24
: hours and keeping the docs with best relevance scores, then another
: query for the previous 24 hours ... but this really isn't very
: efficient. Maybe OK for news because I may need to serve for up to 7
: days. Still, 7 solr queries for a front-end query doesn't sound ideal.
: So I'm still in search for a better way ...

if you have discrete chunks oftime in which you consider stories "more 
relevant" (ie: today, yesterday, this week) you can always use regula 
range queries as boost queries to bump their scores up...

bq=pubDate:[NOW/DAY TO *]^10 pubDate:[NOW/DAY-1DAY TO *]^5 
pubDate:[NOW/DAY-7DAY TO *]

with large enough boostfactors on those queries, you can essentially force 
them to be themost significant part of the score, so you get everything 
from today sorted by relevancy, followed by everything from yesterday, 
etc...

although at a certain point, if you know this is waht you want, you might 
just want a date field indexed after rounding down to the nearest day, and 
sort by it, then sort by score.

-Hoss

Reply via email to