Class WeightFactorFunction

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

public class WeightFactorFunction
extends ScoreFunction
  • Constructor Details

    • WeightFactorFunction

      public WeightFactorFunction​(float weight, ScoreFunction scoreFunction)
    • WeightFactorFunction

      public WeightFactorFunction​(float weight)
  • Method Details

    • getLeafScoreFunction

      public LeafScoreFunction getLeafScoreFunction​(org.apache.lucene.index.LeafReaderContext ctx) throws java.io.IOException
      Specified by:
      getLeafScoreFunction in class ScoreFunction
      Throws:
      java.io.IOException
    • needsScores

      public boolean needsScores()
      Description copied from class: ScoreFunction
      Indicates if document scores are needed by this function.
      Specified by:
      needsScores in class ScoreFunction
      Returns:
      true if scores are needed.
    • explainWeight

      public org.apache.lucene.search.Explanation explainWeight()
    • getWeight

      public float getWeight()
      Overrides:
      getWeight in class ScoreFunction
    • getScoreFunction

      public ScoreFunction getScoreFunction()
    • doEquals

      protected boolean doEquals​(ScoreFunction other)
      Description copied from class: ScoreFunction
      Indicates whether some other ScoreFunction object of the same type is "equal to" this one.
      Specified by:
      doEquals in class ScoreFunction
    • doHashCode

      protected int doHashCode()
      Specified by:
      doHashCode in class ScoreFunction