"Fossies" - the Fresh Open Source Software Archive 
Member "mroonga-12.04/mysql-test/mroonga/wrapper/column/generated/virtual/r/add_fulltext_index.result" (6 Jun 2022, 723 Bytes) of package /linux/misc/mroonga-12.04.tar.gz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 DROP TABLE IF EXISTS logs;
2 CREATE TABLE logs (
3 id INT PRIMARY KEY,
4 record JSON,
5 message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL
6 ) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"';
7 INSERT INTO logs(id, record)
8 VALUES (1, '{"level": "info", "message": "start server"}');
9 ALTER TABLE logs ADD FULLTEXT INDEX (message);
10 INSERT INTO logs(id, record)
11 VALUES (2, '{"level": "info", "message": "start server"}');
12 INSERT INTO logs(id, record)
13 VALUES (3, '{"level": "warn", "message": "abort server"}');
14 SELECT * FROM logs WHERE MATCH(message) AGAINST('+start' IN BOOLEAN MODE);
15 id record message
16 2 {"level": "info", "message": "start server"} "start server"
17 DROP TABLE logs;