Page 1 of 1

Full-text search doesn't work for multi-byte languages

Posted: Fri Nov 10, 2006 7:35 am
by deminy
When a user use East Asian words as keywords to search entries, he will get no result since MySQL's full-text search doesn't work for multi-byte languages (like Chinese, Japanese, etc).

I think it's better to provide a switch to switch between full-text search and like-statement search, which means the following two functions need to be updated:

1. function "serendipity_searchEntries" in file "include/functions_entries.inc.php"; and

2. function "serendipity_drawList" in file "include/admin/entries.inc.php"

BTW, there is a minor bug in function "serendipity_drawList". Function "serendipity_searchEntries" works for PostgreSQL, SQLite and MySQL, while function "serendipity_drawList" only works for MySQL (if user wants to search "body" information).

Re: Full-text search doesn't work for multi-byte languages

Posted: Sat Nov 11, 2006 4:07 pm
by garvinhicking
Hi!

Hm, but the LIKE search is terribly slow. I figure a better solution would be to make MySQL support multibyte languages. :)

Adding a config option to toggle the use should not be that hard, because I think there already is a code brnach that uses LIKE if pgsql or sqlite is used...

Regards,
Garvin

Re: Full-text search doesn't work for multi-byte languages

Posted: Thu Dec 28, 2006 5:58 pm
by xzilla
Maybe the better solution is to just switch to postgres and use tsearch2, which can do multibyte free text search.