Bug #47745
closedindexed_search / Indexer: frequency mapping buggy
100%
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;
Updated by Gerrit Code Review over 11 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20356
Updated by Gerrit Code Review over 11 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20356
Updated by Gerrit Code Review about 10 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/20356
Updated by Gerrit Code Review about 10 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32993
Updated by Anonymous about 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 86e40159ff4974f9addde6fb4a4537f4f98c7430.