lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: DisMax query and date boosting
Date Thu, 19 Jul 2007 18:55:38 GMT

: Just tried the bq approach and it works beautifully. Exactly what I was
: looking for. Still, I'd like to know which approach is the preferred? Thanks
: again guys.

i personally recommend the function approach, because it gives you a more
gradual falloff in terms of the scores of documents ... the BQ approahc
works great for simple boosting of "things in the last N days should score
really high" but 1 millisecond after that cut off the score plummets

side note...

: > > Sorry just correcting myself:
: > > <str name="bq">your_date_field:[NOW-24HOURS TO NOW]^ 10.0</str>

the first example is perfectly fine, and will be more efficient because it
will take better advantage of the field cache...

: > > > <str name="bq">your_date_field:[NOW/DAY-24HOURS TO NOW]^10.0</str>

...if you don't round down to the nearest day, then every request will
generate a new query which will get put in the filterCache.  if a day
isn't granular enough for you, you can round to the nearest hour (or even
minute) but i strongly suggest you round to something so you don't wind up
using millisecond precision....

<str name="bq">your_date_field:[NOW/HOUR-1DAY TO NOW]^10.0</str>


View raw message