public class RandomScoreFunction extends ScoreFunction
LeafScoreFunction.score(int, float).| Constructor and Description |
|---|
RandomScoreFunction()
Default constructor.
|
RandomScoreFunction(int seed,
int salt,
IndexFieldData<?> uidFieldData)
Creates a RandomScoreFunction.
|
| Modifier and Type | Method and Description |
|---|---|
LeafScoreFunction |
getLeafScoreFunction(org.apache.lucene.index.LeafReaderContext ctx) |
boolean |
needsScores()
Indicates if document scores are needed by this function.
|
getDefaultScoreCombinerpublic RandomScoreFunction()
public 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.Copyright © 2009–2017. All rights reserved.