Actions
Bug #47745
closedindexed_search / Indexer: frequency mapping buggy
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Indexed Search
Target version:
-
Start date:
2013-04-30
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:
Description
There is a slight glitch in indexed_search's indexer, which results in a wrong frequency mapping if the ratio between number of current word / all words is exactly 1. The "frequency" for this word should be mapped to the highest possible value, but is mapped to -INF due to a wrong if condition.
For testing: this may happen if indexed_search indexes a blank page having only a page title and this title having only one word (therefore ratio 1/1 = 1).
Symptom of the bug: ###RATING### marker will have funny values for rank_flag (blank) and rank_freq (-INF%) for the corresponding result if you search for this page's title.
Fix:
$mapFactor = $this->freqMax * 100 * $this->freqRange; if ($freq < 1) { $newFreq = $freq * $mapFactor;
should be:
$mapFactor = $this->freqMax * 100 * $this->freqRange; if ($freq <= 1) { $newFreq = $freq * $mapFactor;
Actions