Project

General

Profile

Actions

Bug #47745

closed

indexed_search / Indexer: frequency mapping buggy

Added by Ralf Hettinger over 11 years ago. Updated about 6 years ago.

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 #1

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

Actions #2

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

Actions #3

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

Actions #4

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

Actions #5

Updated by Anonymous about 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF