lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: Boosting documents
Date Mon, 26 Jul 2004 18:14:09 GMT
Rob Clews wrote:
> I want to do the same, set a boost for a field containing a date that
> lowers as the date is further from now, is there any way I could do
> this?

You could implement Similarity.idf(Term, Searcher) to, when 
Term.field().equals("date"), return a value that is greater for more 
recent dates.

Doug

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message