MySQL Chinese index plug-in mysqlcft installation and use bitsCN.com
MySQL Chinese index plug-in mysqlcft installation and use
1. MySQL must be dynamically compiled and installed to load the dynamic link library.
2. edit the MySQL configuration file my. cnf and add ft_min_word_len = 1 to the [mysqld] Section (meaning the number of bytes occupied by the smallest word)
3. install the mysqlcft Chinese full-text index plug-in
Log on to the MySQL server from the command line
View MySQL plug-in Directory
Show variables like ‘plugin_dir’;
Download the mysqlcft Chinese index plug-in, decompress it, and copy the mysqlcft. so file to the MySQL plug-in directory.
Https://code.google.com/p/mysqlcft has 32-bit and 64-bit optional
Start installing the mysqlcft. so plug-in
Install plugin mysqlcft soname ‘mysqlcft.so’;
Check whether the mysqlcft. so plug-in is successfully installed.
show plugins;
4. uninstall the mysqlcft. so plug-in. before uninstalling the plug-in, delete the full-text index created using mysqlcft.
uninstall plugin mysqlcft;
5. add the mysqlcft full-text index to an existing table
Create a single-column full-text index
Alter ignore table database name. table name add fulltext index full-text index name (field name) with parser mysqlcft;
Create full-text Union index
Alter ignore table database name. table name add fulltext index full-text joint index name (field name 1, field name 2) with parser mysqlcft;
6. query example
Select * from table where match (title) against ('Beijing' in Boolean mode );
BitsCN.com