MySQL Chinese index plug-in mysqlcft Installation and Use

Source: Internet
Author: User

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 );

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.