MySql 布尔模式下的 FullTextSearch 返回的返回结果短于 ft_min_word_len
MySql FullTextSearch in Boolean mode returning returning results shorter than ft_min_word_len
我在布尔模式下使用 Mysql FTS 查询,如下所示
SELECT org.org_name FROM org
WHERE MATCH org.org_name AGAINST ('an*' in BOOLEAN MODE);
这给了我以下结果
+--------------------------+
| org_name |
+--------------------------+
| Chairs and Table Company |
| and |
+--------------------------+
2 rows in set (0.00 sec)
但是,我的理解是所有小于 ft_min_word_len 的结果都会被忽略,在我的例子中,ft_min_word_len 是 4,如下面的查询结果所示 (show像 'ft%';)
这样的变量
+--------------------------+----------------+
| Variable_name | Value |
+--------------------------+----------------+
| ft_boolean_syntax | + -><()~*:""&| |
| ft_max_word_len | 84 |
| ft_min_word_len | 4 |
| ft_query_expansion_limit | 20 |
| ft_stopword_file | (built-in) |
+--------------------------+----------------+
我想知道如果我的理解是正确的,为什么会返回像“和”这样的结果。谢谢。
全文搜索在 InnoDB 和 MyISAM tables 中都可用。但是,例如,它们有不同的变量集控制它们。
MyISAM InnoDB
ft_min_word_len innodb_ft_min_token_size
ft_max_word_len innodb_ft_max_token_size
SHOW TABLE STATUS WHERE Name = 'tablename'
向您展示 table 的引擎。
我在布尔模式下使用 Mysql FTS 查询,如下所示
SELECT org.org_name FROM org
WHERE MATCH org.org_name AGAINST ('an*' in BOOLEAN MODE);
这给了我以下结果
+--------------------------+
| org_name |
+--------------------------+
| Chairs and Table Company |
| and |
+--------------------------+
2 rows in set (0.00 sec)
但是,我的理解是所有小于 ft_min_word_len 的结果都会被忽略,在我的例子中,ft_min_word_len 是 4,如下面的查询结果所示 (show像 'ft%';)
这样的变量+--------------------------+----------------+
| Variable_name | Value |
+--------------------------+----------------+
| ft_boolean_syntax | + -><()~*:""&| |
| ft_max_word_len | 84 |
| ft_min_word_len | 4 |
| ft_query_expansion_limit | 20 |
| ft_stopword_file | (built-in) |
+--------------------------+----------------+
我想知道如果我的理解是正确的,为什么会返回像“和”这样的结果。谢谢。
全文搜索在 InnoDB 和 MyISAM tables 中都可用。但是,例如,它们有不同的变量集控制它们。
MyISAM InnoDB
ft_min_word_len innodb_ft_min_token_size
ft_max_word_len innodb_ft_max_token_size
SHOW TABLE STATUS WHERE Name = 'tablename'
向您展示 table 的引擎。