Mroonga blog

2014-01-29

Mroonga 3.12 has been released!

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

How to install: Install

Here is the topics for this release:

  • Supported to customize lock timeout
  • Improved compatibility with Tritonn's W pragma

If you are using pragma in SQLs, you need change your query for Mroonga 3.12 or later.

Supported to customize lock timeout

In this release, it makes lock timeout customizable now.

In the previous versions, lock timeout is hard-coded in source code. You need to modify source code if you want to change the value of it.

Now, Mroonga supports to customize lock timeout. Here is the sample to change lock timeout in 1000ms:

SET GLOBAL mroonga_lock_timeout = 1000;

Note that Groonga 3.1.2 is required.

Improved compatibility with Tritonn's W pragma

In this release, we improved compatibility with Tritonn's W pragma.

Before:

  • Mroonga uses omitted section as weight 0.
  • Mroonga uses 0-origin as section number.

After:

  • Mroonga uses omitted section as weight 1.
  • Mroonga uses 1-origin as section number.

By above changes, Mroonga's behaviour is same as Tritonn.

As this is imcopatible changes, please check existing query which is affected.

Here is the concrete example using multiple column index for title column and comment column.

CREATE TABLE books (
  `id` INTEGER AUTO_INCREMENT,
  `title` text,
  `comment` text,
  PRIMARY KEY(`id`),
  FULLTEXT INDEX content_index (title, comment)
) engine=mroonga default charset utf8;

In the previous versions, as Mroonga uses 0-origin, here is the query which uses 10 weight for title column, 1 weight for comment column.

SELECT title, comment, MATCH (title,comment) AGAINST('*W0:10,1:1 +Groonga' IN BOOLEAN MODE) AS score FROM books;

The title column matches section number 0, the comment column matches section number 1 in above query.

After Mroonga 3.12, as Mroonga uses 1-origin, the title column matches section number 1, the comment column matches section number 2 in above query. Here is the rewrited query for Mroonga 3.12 or later.

SELECT title, comment, MATCH (title,comment) AGAINST('*W1:10,2:1 +Groonga' IN BOOLEAN MODE) AS score FROM books;

Conclusion

See Release 3.12 - 2014/01/29 about detailed changes since 3.11.

Let's search by Mroonga!