public abstract static class DecayFunctionParser.AbstractDistanceScoreFunction extends ScoreFunction
Modifier and Type | Field and Description |
---|---|
protected MultiValueMode |
mode |
protected double |
offset |
Constructor and Description |
---|
AbstractDistanceScoreFunction(double userSuppiedScale,
double decay,
double offset,
DecayFunction func,
MultiValueMode mode) |
Modifier and Type | Method and Description |
---|---|
protected abstract double |
distance(int docId)
This function computes the distance from a defined origin.
|
org.apache.lucene.search.Explanation |
explainScore(int docId,
org.apache.lucene.search.Explanation subQueryScore) |
protected abstract String |
getDistanceString(int docId) |
protected abstract String |
getFieldName() |
double |
score(int docId,
float subQueryScore) |
getDefaultScoreCombiner, setNextReader
protected final double offset
protected final MultiValueMode mode
public AbstractDistanceScoreFunction(double userSuppiedScale, double decay, double offset, DecayFunction func, MultiValueMode mode)
public double score(int docId, float subQueryScore)
score
in class ScoreFunction
protected abstract double distance(int docId)
protected abstract String getDistanceString(int docId)
protected abstract String getFieldName()
public org.apache.lucene.search.Explanation explainScore(int docId, org.apache.lucene.search.Explanation subQueryScore)
explainScore
in class ScoreFunction
Copyright © 2009–2015. All rights reserved.