Class DependencySimilarity


  • @NotThreadSafe
    public class DependencySimilarity
    extends org.apache.lucene.search.similarities.ClassicSimilarity
    Author:
    Jeremy Long
    • Nested Class Summary

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

        org.apache.lucene.search.similarities.Similarity.SimScorer
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      float idf​(long docFreq, long numDocs)
      Override the default IDF implementation so that frequency within all document is ignored.
      • Methods inherited from class org.apache.lucene.search.similarities.ClassicSimilarity

        idfExplain, lengthNorm, tf, toString
      • Methods inherited from class org.apache.lucene.search.similarities.TFIDFSimilarity

        idfExplain, scorer
      • Methods inherited from class org.apache.lucene.search.similarities.Similarity

        computeNorm, getDiscountOverlaps
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DependencySimilarity

        public DependencySimilarity()
    • Method Detail

      • idf

        public float idf​(long docFreq,
                         long numDocs)

        Override the default IDF implementation so that frequency within all document is ignored.

        See this article for more details.
        Overrides:
        idf in class org.apache.lucene.search.similarities.ClassicSimilarity
        Parameters:
        docFreq - - the number of documents which contain the term
        numDocs - - the total number of documents in the collection
        Returns:
        1