java.lang.Object
org.elasticsearch.common.lucene.search.function.ScoreFunction
Direct Known Subclasses:
DecayFunctionBuilder.AbstractDistanceScoreFunction, FieldValueFactorFunction, FunctionScoreQuery.FilterScoreFunction, RandomScoreFunction, ScriptScoreFunction, WeightFactorFunction

public abstract class ScoreFunction extends Object
  • Constructor Details

  • Method Details

    • getDefaultScoreCombiner

      public CombineFunction getDefaultScoreCombiner()
    • getLeafScoreFunction

      public abstract LeafScoreFunction getLeafScoreFunction(org.apache.lucene.index.LeafReaderContext ctx) throws IOException
      Throws:
      IOException
    • needsScores

      public abstract boolean needsScores()
      Indicates if document scores are needed by this function.
      Returns:
      true if scores are needed.
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getWeight

      public float getWeight()
    • doEquals

      protected abstract boolean doEquals(ScoreFunction other)
      Indicates whether some other ScoreFunction object of the same type is "equal to" this one.
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • doHashCode

      protected abstract int doHashCode()
    • rewrite

      protected ScoreFunction rewrite(org.apache.lucene.index.IndexReader reader) throws IOException
      Throws:
      IOException