Class EdgeIndexSimilarity


  • public class EdgeIndexSimilarity
    extends org.apache.lucene.search.similarities.DefaultSimilarity
    Similarity class for edge index
    Since:
    7.17
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.lucene.search.similarities.Similarity

        org.apache.lucene.search.similarities.Similarity.SimScorer, org.apache.lucene.search.similarities.Similarity.SimWeight
    • Field Summary

      • Fields inherited from class org.apache.lucene.search.similarities.DefaultSimilarity

        discountOverlaps
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      float coord​(int overlap, int maxOverlap)
      All fields in edge index only contain a single value.
      float idf​(long docFreq, long numDocs)  
      float queryNorm​(float sumOfSquaredWeights)  
      float tf​(float freq)  
      • Methods inherited from class org.apache.lucene.search.similarities.DefaultSimilarity

        decodeNormValue, encodeNormValue, getDiscountOverlaps, lengthNorm, scorePayload, setDiscountOverlaps, sloppyFreq, toString
      • Methods inherited from class org.apache.lucene.search.similarities.TFIDFSimilarity

        computeNorm, computeWeight, idfExplain, idfExplain, simScorer
    • Constructor Detail

      • EdgeIndexSimilarity

        public EdgeIndexSimilarity()
    • Method Detail

      • coord

        public float coord​(int overlap,
                           int maxOverlap)
        All fields in edge index only contain a single value. It is therefore not possible for a single field to match multiple query terms (unless they are all the same). Hence, we can disregard the maxOverlap parameter.
        Overrides:
        coord in class org.apache.lucene.search.similarities.DefaultSimilarity
      • tf

        public float tf​(float freq)
        Overrides:
        tf in class org.apache.lucene.search.similarities.DefaultSimilarity
      • idf

        public float idf​(long docFreq,
                         long numDocs)
        Overrides:
        idf in class org.apache.lucene.search.similarities.DefaultSimilarity
      • queryNorm

        public float queryNorm​(float sumOfSquaredWeights)
        Overrides:
        queryNorm in class org.apache.lucene.search.similarities.DefaultSimilarity