MySQL 中文全文检索 ngram 处理停止词

MySQL 索引 全文检索 About 394 words

ngram 中文分词处理器

添加中文全文检索索引

ALTER TABLE post ADD FULLTEXT INDEX ft_index (title,content) WITH PARSER ngram;

处理停止词,在my.cnfmy.ini[mysqld]下配置

ngram_token_size=2

InnoDB 存储引擎

查看ngram如何标记文本

SET GLOBAL innodb_ft_aux_table="z-blog/post";

SELECT 
    *
FROM
    information_schema.innodb_ft_index_cache
ORDER BY doc_id , position;

参考文档

https://dev.mysql.com/doc/refman/5.7/en/fulltext-search-ngram.html

Views: 5,063 · Posted: 2019-04-04

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh