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