Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to set up mysql8 to have its own full-text index

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The following is about the full-text index that comes with mysql8. The secret of the text is that it is close to the topic. So, no gossip, let's go straight to the following, I believe you will benefit from reading this article with mysql8's own full-text index.

Modify the configuration file:

Vim / etc/ my.cnf [mysqld] ngram_token_size=2 creation table: create table test (id int (11) not null primary key auto_increment,name varchar (100) not null comment 'business name', brand varchar (100) default null comment 'brand name', en varchar (100) default null comment 'English name', fulltext key (name,brand,en) with parser ngram) engine=innodb default charset=utf8 Insert into test (name,brand,en) values ('Wuhu Meimei Kitchen and Sanitary Electrical Manufacturing Co., Ltd.,' aa','wh'); insert into test (name,brand,en) values ('Beijing VANCL Shangpin Electronic Commerce Co., Ltd.,' aa','ef'); insert into test (name,brand,en) values ('VANCL Eslite (Beijing) Technology Co., Ltd.,' aa','dfd') Insert into test (name,brand,en) values ('Instant Unicom (Beijing) Co., Ltd.,' aa','sdfs'); insert into test (name,brand,en) values ('Beijing Changjie Communication Co., Ltd.,' aa','wsdh'); insert into test (name,brand,en) values ('Beijing Changjietong payment Technology Co., Ltd.,' aa','df') Insert into test (name,brand,en) values ('Changjietong Information Technology Co., Ltd.,' aa','whdfgh'); insert into test (name,brand,en) values ('Beijing Changjie Technology Co., Ltd.,' aa','dgdf'); insert into test (name,brand,en) values ('China Aerospace Industry Science and Technology Consulting Co., Ltd.,' aa','whffgh') Insert into test (name,brand,en) values ('Beijing Panasonic Color Picture Tube Co., Ltd.,' aa','wfghfgh'); Test: select * from test where match (name,brand,en) against ('Beijing')

For the above mysql8 comes with full-text index-related content, is there anything you don't understand? Or if you want to know more about it, you can continue to follow our industry information section.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report