Project

General

Profile

Actions

Bug #15020

closed

mysql like regarding german "umlaute"

Added by Nikolas Hagelstein over 18 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Indexed Search
Target version:
-
Start date:
2005-10-10
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

when performing a like search on index_search.baseword containing a special character like an german "umlaut" e.g."ß"
mysql returns
"schloß"
but also
"schloss"

this is because mysql reduces characters to its "basecharater" unless the db field is flagged as binary.

a resultrow containing basecharactered word instead of the orignal search word makes indexedsearch fail on rendering the preview/highlight-searchword stuff.

quick n dirty workaround is to set index_search.baseword to binary.

(issue imported from #M1561)

Actions #1

Updated by Sebastian Kurfuerst over 18 years ago

We cannot change this table field to binary, as this table is needed quite often and changing this field to binary might have serious speed impacts.
Are there some frontend errors because of this problem?
Greets, Sebastian

Actions #2

Updated by Nikolas Hagelstein over 18 years ago

Are there some frontend errors because of this problem?

yes there are :
"a resultrow containing basecharactered word instead of the orignal search word makes indexedsearch fail on rendering the preview/highlight-searchword stuff."

cheers,
Nikolas

Actions #3

Updated by Sebastian Kurfuerst over 18 years ago

Hi Michael,
maybe you can have a look at this, as you know indexed search very well.
Greets, Sebastian

Actions #4

Updated by Michael Stucki over 18 years ago

Changing the field to a blob does requires that the baseword index will be removed.

This is definitely a bad idea and I will not change this unless there is another solution.

Actions #5

Updated by Michael Stucki over 18 years ago

Forget my last comment, BINARY != BLOB
Yes I think this can be changed now :-)

Actions #6

Updated by Nikolas Hagelstein over 18 years ago

Michael:
but ...changing to binary would disable any "intelligent"-search which is possible wanted. A better solution would be to improve the "highlight searched word"-part.
Cheers,
Nikolas

Actions #7

Updated by Christian Zehaczek almost 16 years ago

What about changing the LIKEs in tx_indexedsearch::getPhashList() to somewhat like this:

CONVERT LIKE CONVERT

Actions #8

Updated by Christian Zehaczek almost 16 years ago

Just tested mentioned CONVERT-Syntax, works well on multiple installations, give it a try :)

Requires MySQL 4.1 or higher.

Regards,
Chris

Actions #9

Updated by David Bruchmann over 14 years ago

Setting collation of the table index_search to utf8_general_ci instead of utf8_unicode_ci should avoid the whole problem outside TYPO3.

Collation of the field baseword also must not be utf8_unicode_ci but utf8_general_ci.

Actions #10

Updated by Xavier Perseguers about 14 years ago

The syntax from note #22214 would break DBAL compatibility. As such -1 for this solution.

Actions #11

Updated by Dmitry Dulepov about 14 years ago

I am going to add this information to the documentation. In general the current solution works correctly for most languages. For example, in Latvian people often omit accents and search with palin latin letters. Google allows that and finds correct words. FOr example, people type "stradat" anf expect to find "str?d?t". This works correctly and according to expectations. Therefore it is not a bug. If this behavior is not desired, database should be updated locally.

Actions #12

Updated by Mathias Schreiber over 9 years ago

  • Description updated (diff)
  • Status changed from Accepted to Needs Feedback
  • Target version deleted (0)
  • TYPO3 Version set to 7
  • Is Regression set to No

is this still viable with the entire utf8 stuff we changed?

Actions #13

Updated by Nikolas Hagelstein over 9 years ago

Mathias Schreiber wrote:

is this still viable with the entire utf8 stuff we changed?

no se, haven't tested this for ages (literally).

Actions #14

Updated by Tymoteusz Motylewski almost 9 years ago

the search works correctly (finds accented words when searching without accents)
however it doesn't highlight the accented word in the text in that case

Actions #15

Updated by Alexander Opitz over 8 years ago

So we can close this issue?

Highlighting of words isn't easy possible.

Actions #16

Updated by Alexander Opitz over 8 years ago

  • Status changed from Needs Feedback to Closed

No feedback within the last 90 days => closing this issue.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions

Also available in: Atom PDF