Class ScriptedSimilarity

java.lang.Object
org.apache.lucene.search.similarities.Similarity
org.elasticsearch.index.similarity.ScriptedSimilarity

public final class ScriptedSimilarity extends org.apache.lucene.search.similarities.Similarity
A Similarity implementation that allows scores to be scripted.
  • Constructor Details

  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • computeNorm

      public long computeNorm(org.apache.lucene.index.FieldInvertState state)
      Specified by:
      computeNorm in class org.apache.lucene.search.similarities.Similarity
    • scorer

      public org.apache.lucene.search.similarities.Similarity.SimScorer scorer(float boost, org.apache.lucene.search.CollectionStatistics collectionStats, org.apache.lucene.search.TermStatistics... termStats)
      Specified by:
      scorer in class org.apache.lucene.search.similarities.Similarity