当我添加一些以布尔模式为条件的单词时,全文匹配忽略了它的索引。选择如下:
explain select * from seeds WHERE MATCH(text) AGAINST ("mount cameroon" IN BOOLEAN MODE);
Run Code Online (Sandbox Code Playgroud)
产出
+----+-------------+-------+----------+---------------+------+---------+------+------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+----------+---------------+------+---------+------+------+-------------+
| 1 | SIMPLE | seeds | fulltext | text | text | 0 | | 1 | Using where |
+----+-------------+-------+----------+---------------+------+---------+------+------+-------------+
Run Code Online (Sandbox Code Playgroud)
具有多个条件词的相同查询
explain select * from seeds WHERE MATCH(text) AGAINST ("mount cameroon" IN BOOLEAN MODE) = 4;
Run Code Online (Sandbox Code Playgroud)
产出
+----+-------------+-------+------+---------------+------+---------+------+------+-------------+
| id …
Run Code Online (Sandbox Code Playgroud)