| java.lang.Object org.apache.solr.search.function.ValueSource org.apache.solr.search.function.ReciprocalFloatFunction
ReciprocalFloatFunction | public class ReciprocalFloatFunction extends ValueSource (Code) | | ReciprocalFloatFunction implements a reciprocal function f(x) = a/(mx+b), based on
the float value of a field as exported by
org.apache.solr.search.function.ValueSource .
When a and b are equal, and x>=0, this function has a maximum value of 1 that drops as x increases.
Increasing the value of a and b together results in a movement of the entire function to a flatter part of the curve.
These properties make this an idea function for boosting more recent documents.
Example:ReciprocalFloatFunction(new ReverseOrdFieldSource("my_date"),1,1000,1000)
See Also: FunctionQuery author: yonik version: $Id: ReciprocalFloatFunction.java 472574 2006-11-08 18:25:52Z yonik $ |
Field Summary | |
final protected float | a | final protected float | b | final protected float | m | final protected ValueSource | source |
a | final protected float a(Code) | | |
b | final protected float b(Code) | | |
m | final protected float m(Code) | | |
ReciprocalFloatFunction | public ReciprocalFloatFunction(ValueSource source, float m, float a, float b)(Code) | | f(source) = a/(m*float(source)+b)
|
hashCode | public int hashCode()(Code) | | |
|
|