summaryrefslogtreecommitdiff
path: root/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_same_match_against.result
blob: a3a668c444509e4a93538ad39dabfef5b7f55ba8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
DROP TABLE IF EXISTS diaries;
SET NAMES UTF8;
CREATE TABLE diaries(
title TEXT,
FULLTEXT KEY (title)
) DEFAULT CHARSET=utf8;
INSERT INTO diaries VALUES("Start groonga");
INSERT INTO diaries VALUES("Start mroonga");
INSERT INTO diaries VALUES("Start groonga and Ruby");
SELECT * FROM diaries;
title
Start groonga
Start mroonga
Start groonga and Ruby
SELECT *,       MATCH(title) AGAINST("groonga" IN BOOLEAN MODE) AS score
FROM diaries
WHERE    MATCH(title) AGAINST("groonga" IN BOOLEAN MODE)
ORDER BY MATCH(title) AGAINST("groonga" IN BOOLEAN MODE);
title	score
Start groonga	1
Start groonga and Ruby	1
DROP TABLE diaries;