mirror of
https://github.com/privacore/open-source-search-engine.git
synced 2025-07-14 02:36:06 -04:00
getTermFreqWeight: Swap y_min/y_max in call to scale_linear() os common terms have less weight
This commit is contained in:
@ -1007,7 +1007,7 @@ void Msg3a::printTerms ( ) {
|
||||
|
||||
static float getTermFreqWeight(int64_t termFreq, int64_t numDocsInColl) {
|
||||
if(numDocsInColl>0)
|
||||
return scale_linear(((float)termFreq)/numDocsInColl, g_conf.m_termFreqWeightFreqMin, g_conf.m_termFreqWeightFreqMax, g_conf.m_termFreqWeightMin, g_conf.m_termFreqWeightMax);
|
||||
return scale_linear(((float)termFreq)/numDocsInColl, g_conf.m_termFreqWeightFreqMin, g_conf.m_termFreqWeightFreqMax, g_conf.m_termFreqWeightMax, g_conf.m_termFreqWeightMin);
|
||||
else
|
||||
return 1.0; //whatever...
|
||||
}
|
||||
|
Reference in New Issue
Block a user