public class RandomScoreFunction extends ScoreFunction
LeafScoreFunction.score(int, float).| Constructor | Description |
|---|---|
RandomScoreFunction(int seed,
int salt,
IndexFieldData<?> uidFieldData) |
Creates a RandomScoreFunction.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected boolean |
doEquals(ScoreFunction other) |
Indicates whether some other
ScoreFunction object of the same type is "equal to" this one. |
protected int |
doHashCode() |
|
LeafScoreFunction |
getLeafScoreFunction(org.apache.lucene.index.LeafReaderContext ctx) |
|
boolean |
needsScores() |
Indicates if document scores are needed by this function.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitequals, getDefaultScoreCombiner, getWeight, hashCode, rewritepublic RandomScoreFunction(int seed,
int salt,
IndexFieldData<?> uidFieldData)
seed - A seed for randomnesssalt - A value to salt the seed with, ideally unique to the running node/indexuidFieldData - The field data for _uid to use for generating consistent random values for the same idpublic LeafScoreFunction getLeafScoreFunction(org.apache.lucene.index.LeafReaderContext ctx)
getLeafScoreFunction in class ScoreFunctionpublic boolean needsScores()
ScoreFunctionneedsScores in class ScoreFunctiontrue if scores are needed.protected boolean doEquals(ScoreFunction other)
ScoreFunctionScoreFunction object of the same type is "equal to" this one.doEquals in class ScoreFunctionprotected int doHashCode()
doHashCode in class ScoreFunction