mysql>
mysql> select * from test where match(title) against("
晴れ");
+----+-----------------------------------+
| id | title |
+----+-----------------------------------+
| 1 | 今日の天気は晴れです。 |
+----+-----------------------------------+
1 row in set (0.00 sec)
mysql> select * from test where match(title) against("雨");
+----+--------------------------------+
| id | title |
+----+--------------------------------+
| 2 | 明日の天気は雨です。 |
+----+--------------------------------+
1 row in set (0.00 sec)
mysql>
mysql> select * from test where match(title) against("
晴れ");
+----+-----------------------------------+
| id | title |
+----+-----------------------------------+
| 1 | 今日の天気は晴れです。 |
+----+-----------------------------------+
1 row in set (0.00 sec)
mysql> select * from test where match(title) against("雨");
+----+--------------------------------+
| id | title |
+----+--------------------------------+
| 2 | 明日の天気は雨です。 |
+----+--------------------------------+
1 row in set (0.01 sec)
*************************** 1. row
***************************
Table: test
Create Table: CREATE TABLE `test` (
`id` int(11) NOT NULL,
`title` varchar(200) NOT NULL,
PRIMARY KEY (`id`),
FULLTEXT KEY `fkey1` (`title`)
) ENGINE=MyISAM DEFAULT CHARSET=ujis
1 row in set (0.00 sec)
mysql> set names utf8;
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> select * from test where match(title) against("
晴れ");
+----+-----------------------------------+
| id | title |
+----+-----------------------------------+
| 1 | 今日の天気は晴れです。 |
+----+-----------------------------------+
1 row in set (0.00 sec)
mysql> select * from test where match(title) against("雨");
+----+--------------------------------+
| id | title |
+----+--------------------------------+
| 2 | 明日の天気は雨です。 |
+----+--------------------------------+
1 row in set (0.00 sec)
mysql>
mysql> set senna_2ind=ON;
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> select * from test where match(title) against("
晴れ");
+----+-----------------------------------+
| id | title |
+----+-----------------------------------+
| 1 | 今日の天気は晴れです。 |
+----+-----------------------------------+
1 row in set (0.00 sec)
mysql> select * from test where match(title) against("雨");
+----+--------------------------------+
| id | title |
+----+--------------------------------+
| 2 | 明日の天気は雨です。 |
+----+--------------------------------+
1 row in set (0.01 sec)