MySQL Chinese index plug-in mysqlcft installation and use _ MySQL

Source: Internet
Author: User
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

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.