Mroonga blog

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!