summaryrefslogtreecommitdiff
path: root/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_recreate.result
blob: cc0fb391628ece8b014c2cf878425a19215baaf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
drop table if exists diaries;
set names utf8;
create table diaries (
id int primary key,
title varchar(255),
content text,
fulltext index (title, content),
fulltext index (title),
fulltext index (content)
) default charset utf8 COMMENT = 'engine "innodb"';
show create table diaries;
Table	Create Table
diaries	CREATE TABLE `diaries` (
  `id` int(11) NOT NULL,
  `title` varchar(255) DEFAULT NULL,
  `content` text DEFAULT NULL,
  PRIMARY KEY (`id`),
  FULLTEXT KEY `title` (`title`,`content`),
  FULLTEXT KEY `title_2` (`title`),
  FULLTEXT KEY `content` (`content`)
) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"'
insert into diaries values(1, "Hello", "はじめました。");
insert into diaries values(2, "天気", "明日の富士山の天気について");
insert into diaries values(3, "富士山", "今日もきれい。");
select * from diaries where match(title, content) against("富士山");
id	title	content
2	天気	明日の富士山の天気について
3	富士山	今日もきれい。
drop index title on diaries;
select * from diaries where match(title, content) against("富士山");
ERROR HY000: Can't find FULLTEXT index matching the column list
create fulltext index new_title_content_index on diaries (title, content);
select * from diaries where match(title, content) against("富士山");
id	title	content
2	天気	明日の富士山の天気について
3	富士山	今日もきれい。
select * from diaries;
id	title	content
1	Hello	はじめました。
2	天気	明日の富士山の天気について
3	富士山	今日もきれい。
drop table diaries;