Description:
https://dev.mysql.com/doc/refman/5.7/en/fulltext-search-mecab.html
In this manual, term search and phrase search don't work as manual.
There is no difference between term search'データベース管理' and '"データベース管理"'.
Term search works as phrase search, and
Phrase search pickup not exact works as filed Bug#88395.
How to repeat:
(1) Term search works as phrase search.
drop table if exists `searches3`;
CREATE TABLE `searches3` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`search_description` mediumtext NOT NULL,
PRIMARY KEY (`id`),
FULLTEXT KEY `idx_desc` (`search_description`) /*!50100 WITH PARSER `mecab` */
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
insert into searches3 values(1 ,'私の仕事はデータベース管理です。'),(2, 'データベースを使って仕事を管理します'),(3, '管理する仕事にデータベースを使ってます');
select id,search_description from searches3 where match (search_description) against ('データベース管理' in boolean mode);
+----+--------------------------------------------------------+
| id | search_description |
+----+--------------------------------------------------------+
| 1 | 私の仕事はデータベース管理です。 |
| 2 | データベースを使って仕事を管理します |
+----+--------------------------------------------------------+
2 rows in set (0.00 sec)
Based on specification, the result is same of this query.
mysql> select id,search_description from searches3 where match (search_description) against ('データベース 管理' in boolean mode);
+----+-----------------------------------------------------------+
| id | search_description |
+----+-----------------------------------------------------------+
| 1 | 私の仕事はデータベース管理です。 |
| 2 | データベースを使って仕事を管理します |
| 3 | 管理する仕事にデータベースを使ってます |
+----+-----------------------------------------------------------+
3 rows in set (0.00 sec)
(2) Phrase search works wrongly. we cannot pick up exact phrase.
mysql> select id,search_description from searches3 where match (search_description) against ('"データベース管理"' in boolean mode);
+----+--------------------------------------------------------+
| id | search_description |
+----+--------------------------------------------------------+
| 1 | 私の仕事はデータベース管理です。 |
| 2 | データベースを使って仕事を管理します |
+----+--------------------------------------------------------+
2 rows in set (0.00 sec)
It pickup データベース noise 管理 as described in Bug#88395.
Based on specification, the result is same of this query.
mysql> select id,search_description from searches3 where match (search_description) against ('"データベース管理"' in boolean mode) and search_description like '%データベース管理%';
+----+--------------------------------------------------+
| id | search_description |
+----+--------------------------------------------------+
| 1 | 私の仕事はデータベース管理です。 |
+----+--------------------------------------------------+
1 row in set (0.00 sec)
Suggested fix:
Modify the behavior as manual.
Or describe limitation on manual.