Bug #40122 Need full-text search to work with Thai text
Submitted: 17 Oct 2008 20:26 Modified: 22 Feb 2013 16:59
Reporter: Samphan Raruenrom Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: FULLTEXT search Severity:S4 (Feature request)
Version:MySQL 5.1 OS:Any
Assigned to: CPU Architecture:Any
Tags: Thai

[17 Oct 2008 20:26] Samphan Raruenrom
Description:
MySQL 5.0 support full-text search as a feature. The built-in parser supports text which are separated by whitespaces. Thai and some CTL (complex text languages) doesn't have any space between words. So they need special parser for the job.

MySQL 5.1 introduce a feature called Full-text search plugin which allow one to write custom parser for any text. (MySQL 6.0 maintain the same architecture.)  Having a custom parser for Thai, i.e. Thai full-text search plugin, will be very useful. It'll open a new possibility that never been achieved before in any DBMS - enabling Thai full-text search support in MySQL.

How to repeat:
The Thai parser would be used like this :-

1) copy the plugin binary to mysql plugin_dir

2) register with mysql

mysql> INSTALL PLUGIN thai_parser SONAME 'libmythaiparser.so';

3) sample sql to show how to use the parser

CREATE TABLE t
(
  doc CHAR(255),
  FULLTEXT INDEX (doc) WITH PARSER thai_parser
);

4) sample sql to show full-text search with a Thai word

SELECT * FROM t WHERE MATCH (doc) AGAINST ('ทำงาน' IN BOOLEAN MODE);

Suggested fix:
The feature will be developed by a local team.
[20 Oct 2008 10:28] Sergei Golubchik
take a look at http://mysqlbigram.googlepages.com/ or http://mysqlftppc.wiki.sourceforge.net/
[22 Feb 2013 16:59] Sveta Smirnova
Thank you for the feature request.

It is verified, but I suggest to you to use one of solutions which Sergei pointed in year 2008.