Kentaro Hayashi [ANN] Mroonga 7.06 - Fast fulltext search for all languages on MySQL
Aug 29, 2017; 17:30
Kentaro Hayashi
[ANN] Mroonga 7.06 - Fast fulltext search for all languages on MySQL
Hi,
Mroonga 7.06 has been released!
Mroonga is a MySQL storage engine that supports fast fulltext search and geolocation search. It is CJK ready. It uses Groonga as a storage and fulltext search engine.
Document: http://mroonga.org/docs/
How to install: Install Guide http://mroonga.org/docs/install.html
How to upgrade: Upgrade Guide http://mroonga.org/docs/upgrade.html
In this release, Generated Column has been supported!
Here is the sample schema to use generated column.
CREATE TABLE logs ( id INT, record JSON, message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' ) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4;
As you can see, the partial value of `record` column is used as `message` column.
Then, you can do full text search against `message` column by the following query.
> SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); +------+-----------------------------------------+-----------+ | id | record | message | +------+-----------------------------------------+-----------+ | 1 | {"level": "info", "message": "start"} | "start" | | 2 | {"level": "info", "message": "restart"} | "restart" | +------+-----------------------------------------+-----------+ 2 rows in set (0.02 sec)
You can also define `VIRTUAL` without actual data column.
CREATE TABLE logs ( id INT, record JSON, message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL ) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4;
But note that `FULLTEXT INDEX(message)` is not supported yet.
Regards,
-- Kentaro Hayashi <hayashi@clear-code.com>
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!