32 ProbEWeight::get_weight()
const
34 double reldocs_without_term = get_rsize() - stats.rtermfreq;
35 double num = (stats.rtermfreq + 0.5) *
36 (get_dbsize() - stats.termfreq - reldocs_without_term + 0.5);
37 double denom = (stats.termfreq - stats.rtermfreq + 0.5) *
38 (reldocs_without_term + 0.5);
39 double tw = log(num / denom);
40 return stats.multiplier * tw;
Collate statistics and calculate the term weights for the ESet.
The Xapian namespace contains public interfaces for the Xapian library.