DROP TABLE IF EXISTS diaries;
SET GLOBAL mroonga_match_escalation_threshold = -1;
CREATE TABLE diaries (
id INT PRIMARY KEY AUTO_INCREMENT,
title TEXT,
tags TEXT,
FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"'
) DEFAULT CHARSET=UTF8 COMMENT='ENGINE "InnoDB"';
SHOW CREATE TABLE diaries;
Table	Create Table
diaries	CREATE TABLE `diaries` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text,
  `tags` text,
  PRIMARY KEY (`id`),
  FULLTEXT KEY `tags_index` (`tags`) COMMENT 'parser "TokenDelimit"'
) ENGINE=mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"'
INSERT INTO diaries (title, tags) VALUES ("Hello groonga!", "groonga install");
INSERT INTO diaries (title, tags) VALUES ("Hello mroonga!", "mroonga install");
SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("install" IN BOOLEAN MODE);
id	title	tags
1	Hello groonga!	groonga install
2	Hello mroonga!	mroonga install
SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE);
id	title	tags
SET GLOBAL mroonga_match_escalation_threshold = 0;
SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE);
id	title	tags
SET mroonga_match_escalation_threshold = 0;
SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE);
id	title	tags
1	Hello groonga!	groonga install
DROP TABLE diaries;
