Mroonga blog

2017-10-29

Mroonga 7.08 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.

Mroonga 7.08 has been released!

Changes

Here are changes in this release.

  • Supported table level flags option.

  • Supported MySQL 5.6.38-2 and 5.7.20-1

  • Supported Ubuntu 17.10 (Artful Aardvark)

Supported table level flags option.

In the previous version, when you create table in Mroonga, you could not set Groonga's table flag. So, if you want create table for saving many big data, you needed to use mroonga_command.

In this release, when you create table, you can specify KEY_LARGE flag. You can more easy make table for save many big data from this.

Here is how to specify KEY_LARGE.

  CREATE TABLE diaries (
    id INT PRIMARY KEY AUTO_INCREMENT,
    content VARCHAR(255),
    FULLTEXT INDEX (content)
  ) ENGINE = Mroonga COMMENT = 'engine "InnoDB"' DEFAULT CHARSET utf8 flags "TABLE_HASH_KEY|KEY_LARGE";

In addition, you can specify TABLE_HASH_KEY, TABLE_PAT_KEY, and TABLE_DAT_KEY table options. For details of each of flags which can specify, see the below documents.

Supported MySQL 5.6.38-2 and 5.7.20-1

In this release, MySQL 5.6.38-2 and 5.7.20-1 are supported!

Supported Ubuntu 17.10 (Artful Aardvark)

In this release, Ubuntu 17.10 (Artful Aardvark) is supported!

Conclusion

See Release 7.08 - 2017-10-29 about detailed changes since 7.07.

Let's search by Mroonga!

2017-10-12

Mroonga 7.07 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.

Mroonga 7.07 has been released!

Changes

Here are changes in this release.

  • mroonga_query_expand UDF has been supported
  • MariaDB 10.1/10.2 package has been supported on CentOS 6/7

mroonga_query_expand UDF has been supported

In this release, mroonga_query_expand UDF has been supported.

Here is the sample schema to use this UDF.

CREATE TABLE diaries (
  id INT PRIMARY KEY AUTO_INCREMENT,
  content VARCHAR(255),
  FULLTEXT INDEX (content)
) ENGINE = Mroonga DEFAULT CHARSET utf8;

CREATE TABLE synonyms (
  term varchar(255),
  synonym varchar(255),
  INDEX (term)
) ENGINE= Mroonga DEFAULT CHARSET utf8;

diaries is table for full text search. synonym table is used to define synonyms.

Then insert sample data:

INSERT INTO synonyms VALUES ('Groonga', 'Groonga Mroonga Rroonga');

INSERT INTO diaries (content) VALUES ("Groonga is fast.");
INSERT INTO diaries (content) VALUES ("Mroonga is fast.");
INSERT INTO diaries (content) VALUES ("PGroonga is fast.");

Let's use mroonga_query_expand UDF.

If you want to search with synonym term, just use mroonga_query_expand("synonyms", "term", "synonym", "Groonga"). This enable you to do full text search by 'Groonga', 'Mroonga', 'Roonga' at once even though specified term is only 'Groonga'.

mysql> SELECT * FROM diaries WHERE MATCH(content) AGAINST(mroonga_query_expand("synonyms", "term", "synonym", "Groonga") IN BOOLEAN MODE);
+----+------------------+
| id | content          |
+----+------------------+
|  1 | Groonga is fast. |
|  2 | Mroonga is fast. |
+----+------------------+
2 rows in set (0.01 sec)

MariaDB 10.1/10.2 package has been supported on CentOS 6/7

In this release, official MariaDB 10.1/10.2 packages has been supported on CentOS 6/7.

To install on each supported environment, see install documents.

Conclusion

See Release 7.07 - 2017-10-12 about detailed changes since 7.06.

Let's search by Mroonga!

2017-08-29

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.

Mroonga 7.06 has been released!

Changes

Here are changes in this release.

  • Generated Column has been supported

Generated Column has been supported

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.

Conclusion

See Release 7.06 - 2017-08-29 about detailed changes since 7.05.

Let's search by Mroonga!

2017-07-29

Mroonga 7.05 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.

Mroonga 7.05 has been released!

Changes

Here are changes in this release.

  • Groonga query log has been supported
  • MariaDB 10.2.7 has been supported
  • Auto command syntax escape feature has been supported
  • Ubuntu 16.10 (Yekkety Yak) support has been dropped

Groonga query log has been supported

In this release, Groonga query log has been supported.

Use mroonga_query_log_file variable to use this feature.

mysql> SET GLOBAL mroonga_query_log_file = "/tmp/query.log";

It is useful to analyze query where is bottle neck in Groonga.

MariaDB 10.2.7 has been supported

In this release, MariaDB 10.2.7 has been supported.

Thanks Tomohiro 'Tomo-p' KATO for contributing to fix build error against MariaDB 10.2.7..

Auto command syntax escape feature has been supported

In this release, auto command syntax escape feature has been supported.

You can specify command name and its argument separately in mroonga_command.

Using new syntax, arguments are automatically escaped, so you don't need to consider what query is actually passed to Groonga layer.

SELECT mroonga_command('COMMAND_NAME',
                     'PARAMETER_NAME_1', 'PARAMETER_VALUE_1',
                     ...,
                     'PARAMETER_NAME_N', 'PARAMETER_VALUE_N');

Example:

SELECT mroonga_command('select',
                       'table', 'diaries',
                       'filter', 'title @ "Groonga"');

It is useful for active mroonga_command user.

Ubuntu 16.10 (Yekkety Yak) support has been dropped

In this release, Ubuntu 16.10 (Yakkety Yak) support was dropped. It has reached EOL at July 20, 2017.

Conclusion

See Release 7.05 - 2017-07-29 about detailed changes since 7.04.

Let's search by Mroonga!

2017-06-29

Mroonga 7.04 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.

Mroonga 7.04 has been released!

Changes

Here are changes in this release.

  • Supported Debian 9 (stretch)

Supported Debian 9 (stretch)

In this release, Debian 9 (stretch) is supported!

Here is the Debian 9 specific install procedure: Install

Note that MariaDB is adopted as a MySQL variant since Debian 9.

Conclusion

See Release 7.04 - 2017-06-29 about detailed changes since 7.03.

Let's search by Mroonga!