BloGroonga

2016-06-29

Groonga 6.0.5 has been released!

Groonga 6.0.5 has been released!

How to install in each environment: Install

Changes

Here are important changes in this release:

  • Improved fuzzy_search to specify max_distance easily
  • Supported query_expand command
  • Reduced build time from source archive

Improved fuzzy_search to specify max_distance easily

fuzzy_search itself was introduced since Groonga 6.0.0, but it is not easy to customize max_distance.

When executing fuzzy search, max_distance parameter is often changed to customize behavior of fuzzy search. In the previous versions, only object literal was accepted as the 3rd argument. It was annoying to specify {'max_distance': N} as the 3rd argument every time to customize it.

Here is the example how to customize max_distance.

Before(Groonga 6.0.0 - 6.0.4):

> fuzzy_search(column, _key, {'max_distance': 2})

After(Groonga 6.0.5 or later):

> fuzzy_search(column, _key, 2)

Supported query_expand command

In this release, query_expand command is supported.

There is a plugin for Groonga to expand query - QueryExpanderTSV. But there is no easy way to conform expanded result from Groonga.

If you can't search well when using query expander plugin, try this command whether expanded query is correct.

Here is the sample tsv which stores synonyms.

% cat synonyms.tsv
# -*- coding: utf-8 -*-
#
# key[TAB]synonym1[TAB]synonym2[TAB]...
#
groonga groonga rroonga mroonga

Let's confirm how to work it.

> plugin_register query_expanders/tsv
[[0,1467092787.938153,0.0003046989440917969],true]
> query_expand QueryExpanderTSV groonga
[[0,1467092794.028075,0.0001063346862792969],"((groonga) OR (rroonga) OR (mroonga))"]

As you can see, groonga is expanded to ((groonga) OR (rroonga) OR (mroonga)).

Reduced build time from source archive

In this release, total build time of Groonga is reduced.

If you use Groonga packages for some distributions, you have nothing to do with it, but, if you build Groonga from source archive, it may be happy with it.

On my PC (CPU:Core i5-4210U Memory:8GB), building Groonga 6.0.4 takes 11 minutes, on the other hand, Groonga 6.0.5 takes about 7 minutes! Yay!

Conclusions

Please refer to Release 6.0.5 - 2016-06-29 about detailed changes since 6.0.4.

Then, let's go all out to search by Groonga!