Class NonNegativeScoresSimilarity


public final class NonNegativeScoresSimilarity
A Similarity that rejects negative scores. This class exists so that users get an error instead of silently corrupt top hits. It should be applied to any custom or scripted similarity.
  • Nested Class Summary

    Nested classes/interfaces inherited from class
  • Constructor Summary

    Constructor Description
    NonNegativeScoresSimilarity​( in)  
  • Method Summary

    Modifier and Type Method Description
    long computeNorm​(org.apache.lucene.index.FieldInvertState state) getDelegate() scorer​(float boost, collectionStats, termStats)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getDelegate

      public getDelegate()
    • computeNorm

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

      public scorer​(float boost, collectionStats, termStats)
      Specified by:
      scorer in class