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 NumericDoubleValues |
distance(org.apache.lucene.index.LeafReaderContext context)
This function computes the distance from a defined origin.
|
protected abstract String |
getDistanceString(org.apache.lucene.index.LeafReaderContext ctx,
int docId) |
protected abstract String |
getFieldName() |
LeafScoreFunction |
getLeafScoreFunction(org.apache.lucene.index.LeafReaderContext ctx) |
getDefaultScoreCombiner, needsScores
protected final double offset
protected final MultiValueMode mode
public AbstractDistanceScoreFunction(double userSuppiedScale, double decay, double offset, DecayFunction func, MultiValueMode mode)
protected abstract NumericDoubleValues distance(org.apache.lucene.index.LeafReaderContext context)
public final LeafScoreFunction getLeafScoreFunction(org.apache.lucene.index.LeafReaderContext ctx)
getLeafScoreFunction
in class ScoreFunction
protected abstract String getDistanceString(org.apache.lucene.index.LeafReaderContext ctx, int docId)
protected abstract String getFieldName()
Copyright © 2009–2016. All rights reserved.