Project

General

Profile

Actions

Bug #99547

closed

Wrong type for indexed_search column "metaphone"

Added by Stefan Froemken over 1 year ago. Updated 11 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Indexed Search
Start date:
2023-01-16
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hello,

one of our customers gets following error message while updating content records over TYPO3 backend:

An exception occurred while executing 'INSERT INTO `index_words` (`wid`, `baseword`, `metaphone`) VALUES (?, ?, ?)' with params: [123456789, "abc", ""]

Column "metaphone" in ext_tables.sql of indexed_search is INT and was untouched since 2004 (Commit of Kasper).

In core I found these lines:

// Metaphone value is also 60 only chars long
$metaphone = $this->enableMetaphoneSearch ? substr($this->metaphone($val, $this->storeMetaphoneInfoAsWords), 0, 60) : '';
$retArr[$val]['metaphone'] = $metaphone;

Both conditions are completely handled as strings. Further the value can be 60 chars long, but in DB just 11 digits can be stored.

I'm not a pro in indexed_search. What do you think? Can we just update INT to VARCHAR?

Stefan

Actions

Also available in: Atom PDF