MySQL Chinese index plug-in mysqlcft installation and use 1. MySQL must be dynamically compiled and installed to load dynamic link libraries. 2. edit MySQL configuration file my. cnf: in the [mysqld] segment, add ft_min_word_len = 1 (meaning the number of bytes occupied by the smallest word) 3. install the mysqlcft Chinese full text index plug-in and log on to the MySQL server from the command line to view the MySQL plug-in Directory
Show variables like ‘plugin_dir’;
Download mysqlcft Chinese index plug-in, decompress and copy mysqlcft. so file to MySQL plug-in directory https://code.google.com/p/mysqlcft has 32-bit and 64-bit optional start to install 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. Create a single-column full-text index for adding a mysqlcft Chinese full-text index to an existing table
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 );