CREATE TABLE tags (
name VARCHAR(64) PRIMARY KEY COLLATE 'utf8mb4_general_ci'
) DEFAULT CHARSET=utf8mb4;
CREATE TABLE bugs (
tags TEXT
COMMENT 'flags "COLUMN_VECTOR|WITH_WEIGHT|WEIGHT_FLOAT32", type "tags"',
FULLTEXT INDEX bugs_tags (tags) COMMENT 'table "tags", flags "WITH_WEIGHT"'
) DEFAULT CHARSET=utf8mb4;
INSERT INTO bugs VALUES ('{"package": 10.1, "priority": 5.5}');
SELECT mroonga_command('dump --dump_plugins no');
mroonga_command('dump --dump_plugins no')
table_create bugs TABLE_NO_KEY

table_create mroonga_operations TABLE_NO_KEY
column_create mroonga_operations record COLUMN_SCALAR UInt32
column_create mroonga_operations table COLUMN_SCALAR ShortText
column_create mroonga_operations type COLUMN_SCALAR ShortText

table_create tags TABLE_PAT_KEY ShortText --normalizer NormalizerMySQLGeneralCI
column_create tags name COLUMN_SCALAR ShortText

column_create bugs tags COLUMN_VECTOR|WITH_WEIGHT|WEIGHT_FLOAT32 tags

load --table tags
[
["_key","name"],
["PACKAGE",""],
["PRIORITY",""]
]

load --table bugs
[
["_id","tags"],
[1,{"PACKAGE":10.1,"PRIORITY":5.5}]
]

column_create tags bugs_tags COLUMN_INDEX|WITH_WEIGHT bugs tags
SELECT mroonga_command('select',
'table', 'bugs',
'match_columns', 'tags',
'query', 'package',
'output_columns', '_score,tags');
mroonga_command('select',
'table', 'bugs',
'match_columns', 'tags',
'query', 'package',
'output_columns', '_score,tags')
[[[1],[["_score","Int32"],["tags","tags"]],[11,{"PACKAGE":10.1,"PRIORITY":5.5}]]]
DROP TABLE bugs;
DROP TABLE tags;
