Пример #1
0
            public override float Score(IState state)
            {
                float score = qWeight * vals.FloatVal(doc);

                // Current Lucene priority queues can't handle NaN and -Infinity, so
                // map to -Float.MAX_VALUE. This conditional handles both -infinity
                // and NaN since comparisons with NaN are always false.
                return(score > float.NegativeInfinity ? score : -float.MaxValue);
            }
Пример #2
0
 public override float FloatVal(int doc)
 {
     return(_enclosingInstance.a / (_enclosingInstance.m * vals.FloatVal(doc) + _enclosingInstance.b));
 }