JQuery in Action
1.3116325 = (MATCH) weight(name:jquery in 4) [DefaultSimilarity], result of:
1.3116325 = score(doc=4,freq=1.0 = termFreq=1.0
), product of:
0.99999994 = queryWeight, product of:
2.0986123 = idf(docFreq=1, maxDocs=6)
0.47650534 = queryNorm
1.3116326 = fieldWeight in 4, product of:
1.0 = tf(freq=1.0), with freq of:
1.0 = termFreq=1.0
2.0986123 = idf(docFreq=1, maxDocs=6)
0.625 = fieldNorm(doc=4)
1.3116325 = score(doc=4,freq=1.0 = termFreq=1.0
表示命中第四个document, 搜索的词('JQuery',转为小写为'jquery')出现的频率为1次
2.0986123 = idf(docFreq=1, maxDocs=6)
idf(该词在多少文档中出现频率),计算公式为1+ ln(maxDocs/(docFreq + 1))
0.47650534 = queryNorm
queryNorm的计算公式为1/(sqrt(q.boot() * sum(idf * t.boot)))
1.0 = tf(freq=1.0), with freq of:
tf(term frequency)的计算公式为sqrt(freq)
0.625 = fieldNorm(doc=4)
计算公式为state.getBoost() * (1.0 / sqrt(numTerms)) numTerms是document中的term的个数(本例中为两个:jquery和action)。准确的计算值为0.707106,为了使用一个byte进行存储,进行了映射
queryWeight 和 fieldWeight将各个子项相乘
1.3116325 = (MATCH) weight(name:jquery in 4) [DefaultSimilarity]
将各个子项相乘,使用的相似器实现类是DefaultSimilarity,命中的docId=4
Posted in: Lucene
Comments are closed.