Mroonga blog

2017-12-29

Mroonga 7.10 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.10 has been released!

Changes

In this release, some improvements for optimization and speedup are included. It also have experimental features, so we are glad if you try the feature and report to us.

And, Groonga 7.1.0 or later is required from this release. Note that you will need to restart MySQL after upgrading to Mroonga 7.10.

The main changes are as follows.

  • [Experimental] Made it possible to always enable condition push down
  • Improved performance for to get fixed size column value
  • Supported count skip optimization with multi column index
  • [CentOS] Supported Percona Server 5.6.38 and 5.7.20
  • Supported MariaDB 10.3

[Experimental] Made it possible to always enable condition push down

Added some variables related to condition push down (Optimization to process search condition at Groonga level rather than MySQL level).

The default value is ONE_FULL_TEXT_SEARCH. It means that condition push down is enabled only when WHERE clause has one MATCH AGAINST condition. It is the same behavior as before.

If the value ALL is set, condition push down is always used (ALL is experimental for now. We are glad if you use it and tell us if it got faster or not).

Setting the value of mroonga_condition_push_down_type to ALL will always use condition push down, which is expected to be faster. However, ALL is an experimental feature for now. We are glad if you to use it and tell us if it got faster or not. The setting method is as follows.

SET mroonga_condition_push_down_type = ALL

Please choose an easy-to-use way for you from the following links. Even if it goes well, it will be nice if you let me know if it does not work. If it fails, please add logs and reproduction steps to the report.

We are waiting for your report.

Improved performance for to get fixed size column value

Supported column cache when to get fixed size column value to improve performance. This function needs to Groonga 7.1.0 or later, Groonga 7.1.0 or later is required from Mroonga 7.10 as described above.

Supported count skip optimization with multi column index

Enable count skip optimization for multi-column index. For details of count skip optimization, refer to the reference manual.

[CentOS] Supported Percona Server 5.6.38 and 5.7.20

In this release, Percona Server 5.6.38 and 5.7.20 has been supported. RPM packages are ready for above versions on CentOS 6 and CentOS 7.

Supported MariaDB 10.3

Supported MariaDB 10.3. If you are using MariaDB 10.3, please try it. Packages for CentOS will be released soon.

Conclusion

See Release 7.10 - 2017-12-29 about detailed changes since 7.09.

Let's search by Mroonga!

2017-11-29

Mroonga 7.09 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.09 has been released!

Changes

Here is a change in this release.

  • MariaDB 10.1.29 and 10.2.11 has been supported

MariaDB 10.1.29 and 10.2.11 has been supported

In this release, MariaDB 10.1.29 and 10.2.11 has been supported. RPM packages are ready for above versions on CentOS 6 and CentOS 7.

Conclusion

See Release 7.09 - 2017-11-29 about detailed changes since 7.08.

Let's search by Mroonga!

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!