DROP TABLE IF EXISTS diaries;
SET NAMES UTF8MB4;
CREATE TABLE diaries (
id INT UNSIGNED NOT NULL,
title VARCHAR(255),
content TEXT,
FULLTEXT INDEX(content)
) DEFAULT CHARSET UTF8MB4;
INSERT INTO diaries VALUES(1, "Hello", "今日からはじめました。");
INSERT INTO diaries VALUES(2, "天気", "明日の富士山の天気について");
INSERT INTO diaries VALUES(3, "富士山", "今日も天気がよくてきれいに見える。");
INSERT INTO diaries VALUES(4, "帰り道", "今日は天気がよくてよかった。");
INSERT INTO diaries VALUES(5, "はれ", "天気がよいのは今日までみたい。");
SET mroonga_enable_optimization=FALSE;
SELECT COUNT(*) FROM diaries
WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE);
COUNT(*)
4
SHOW STATUS LIKE 'mroonga_count_skip';
Variable_name	Value
Mroonga_count_skip	0
SET mroonga_enable_optimization=TRUE;
DROP TABLE diaries;
