According to
https://lucene.apache.org/java/3_4_0/api/core/org/apache/lucene/search/Similarity.html

idf(t)<https://lucene.apache.org/java/3_4_0/api/core/org/apache/lucene/search/DefaultSimilarity.html#idf(int,
int)>  =  1 + log ( numDocs/(docFreq+1))


For example, in the following example,  ln(26/(6+1)) + 1 = 2.312

0.18314168 = (MATCH) sum of:
  0.18314168 = (MATCH) weight(text:gb in 1), product of:
    0.35845062 = queryWeight(text:gb), product of:
      2.3121865 = idf(docFreq=6, numDocs=26)
      0.15502669 = queryNorm
    0.5109258 = (MATCH) fieldWeight(text:gb in 1), product of:
      1.4142135 = tf(termFreq(text:gb)=2)
      2.3121865 = idf(docFreq=6, numDocs=26)
      0.15625 = fieldNorm(field=text, doc=1)

However, in some case,  when I search o'reilly ,  I see

  *  44.0865 = idf(title: o''reilli=4 o=1488 reilli=14 oreilli=4)*

In this cae, How is IDF calculated?


Thanks!

Reply via email to