public class RandomScoreFunction extends ScoreFunction
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 |
|---|---|
org.apache.lucene.search.Explanation |
explainScore(int docId,
org.apache.lucene.search.Explanation subQueryScore) |
double |
score(int docId,
float subQueryScore) |
void |
setNextReader(org.apache.lucene.index.AtomicReaderContext context) |
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 void setNextReader(org.apache.lucene.index.AtomicReaderContext context)
setNextReader in class ScoreFunctionpublic double score(int docId,
float subQueryScore)
score in class ScoreFunctionpublic org.apache.lucene.search.Explanation explainScore(int docId,
org.apache.lucene.search.Explanation subQueryScore)
explainScore in class ScoreFunctionCopyright © 2009–2016. All rights reserved.