TAURUSDB-STD-MySQL 8.0是否支持全文检索

时间:2025-01-26 10:47:26

MySQL 8.0是否支持全文检索

MySQL 8.0版本支持全文检索,关键字为FULLTEXT。可执行如下SQL语句测试。

  • 创建表
    CREATE TABLE ARTICLE (id int unsigned NOT NULL AUTO_INCREMENT, title varchar(200) DEFAULT NULL, content text,PRIMARY KEY (id), FULLTEXT KEY title (title,content),FULLTEXT KEY fulltext_article (title,content)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  • 创建索引
    ALTER TABLE ARTICLE ADD FULLTEXT INDEX fulltext_article (title,content);
  • 查看索引
    SHOW INDEX FROM ARTICLE;
support.huaweicloud.com/taurusdb-std_faq/taurusdb_01_0234.html