Class RandomScoreFunction

java.lang.Object
org.elasticsearch.common.lucene.search.function.ScoreFunction
org.elasticsearch.common.lucene.search.function.RandomScoreFunction

public class RandomScoreFunction extends ScoreFunction
Pseudo randomly generate a score for each LeafScoreFunction.score(int, float).
  • Constructor Details

    • RandomScoreFunction

      public RandomScoreFunction(int seed, int salt, IndexFieldData<?> uidFieldData)
      Creates a RandomScoreFunction.
      Parameters:
      seed - A seed for randomness
      salt - A value to salt the seed with, ideally unique to the running node/index
      uidFieldData - The field data for _uid to use for generating consistent random values for the same id
  • Method Details