Kouhei Sutou
null+****@clear*****
Wed Oct 29 23:16:13 JST 2014
Kouhei Sutou 2014-10-29 23:16:13 +0900 (Wed, 29 Oct 2014) New Revision: 8851715a9c4e8e60084fd95b6c3de80c6d29cb1c https://github.com/groonga/groonga.org/commit/8851715a9c4e8e60084fd95b6c3de80c6d29cb1c Message: Add Groonga 4.0.7 release announcement Added files: en/_posts/2014-10-29-release.md ja/_posts/2014-10-29-release.md Added: en/_posts/2014-10-29-release.md (+102 -0) 100644 =================================================================== --- /dev/null +++ en/_posts/2014-10-29-release.md 2014-10-29 23:16:13 +0900 (50b8323) @@ -0,0 +1,102 @@ +--- +layout: post.en +title: Groonga 4.0.7 has been released +description: Groonga 4.0.7 has been released! +--- + +## Groonga 4.0.7 has been released + +[Groonga 4.0.7](/docs/news.html#release-4-0-7) has been released! + +How to install: [Install](/docs/install.html) + +### Changes + +In this release, two big experimental features: + + * Column value compression support + * Token filter support + +#### Column value compression support + +In this release, Groonga has supported column compression by zlib or LZ4. + +You can save disk spaces by this feature. This feature is implemented by [@naoa_y](https://twitter.com/naoa_y). Thanks! + +Here is the pros/cons: + + * zlib: compression rate is better than LZ4, but performance is not. + * LZ4: performance is good, but compression rate is not better than Zlib. + +Add `COMPRESS_ZLIB` or `COMPRESS_LZ4` flag to `flags` for `column_create`. + + column_create Entries content COLUMN_SCALAR|COMPRESS_ZLIB Text + column_create Entries content COLUMN_SCALAR|COMPRESS_LZ4 Text + +Here is the brief benchmark provided by @naoa_y. It shows characteristics of each compression. + + * https://github.com/groonga/groonga/pull/221#issuecomment-59627302 + * https://github.com/groonga/groonga/pull/223#issue-46381569 + +#### Token filter support + +In this release, Groonga has supported token filters. + +There are two token filters. + + * [TokenFilterStopWord](/docs/reference/token_filters.html#token-filter-stop-word) + * [TokenFilterStem](/docs/reference/token_filters.html#token-filter-stem) + +##### `TokenFilterStopWord` + +If you use `TokenFilterStopWord`, token which is registered as stop word is just ignored. + +Here is the sample query to setup the lexicon and stop word: + + table_create Terms TABLE_PAT_KEY ShortText \ + --default_tokenizer TokenBigram \ + --normalizer NormalizerAuto \ + --token_filters TokenFilterStopWord + column_create Terms memos_content COLUMN_INDEX|WITH_POSITION Memos content + column_create Terms is_stop_word COLUMN_SCALAR Bool + load --table Terms + [ + {"_key": "and", "is_stop_word": true} + ] + +You need to create `is_stop_word` column and register stop word as `_key` column. Note that the value of `is_stop_word` must be true. + +Since `"and"` is registered as stop word, if you search `"Hello and"`, Groonga ignores `"and"` from query, then it returns search results as if you just search `"Hello"`. + +See [documentation](/docs/reference/token_filters.html#token-filter-stop-word) about `TokenFilterStopWord`. + +##### `TokenFilterStem` + +`TokenFilterStem` supports stemming feature. This feature is accomplished by using libstemmer. + +Here is the sample to use `TokenFilterStem`: + + table_create Terms TABLE_PAT_KEY ShortText \ + --default_tokenizer TokenBigram \ + --normalizer NormalizerAuto \ + --token_filters TokenFilterStem + +When creating the lexicon table, you need to specify `--token_filters TokenFilterStem`. + +Now, even though search query is `"develop"`, the stemming library regards as same as `"developing"` or `"developed"`, search result contains those keywords. + +See [documentation](/docs/reference/token_filters.html#token-filter-stem) about `TokenFilterStem`. + +### For Debian users + +Groonga package has been included in the official Debian repository. sid users can install Groonga from the official Debian repository. + +### For Ubuntu users + +Groonga project provides package for Ubuntu 14.10. + +### Conclusion + +See [Release 4.0.7 2014/10/29](/docs/news.html#release-4-0-7) about detailed changes since 4.0.6. + +Let's search by Groonga! Added: ja/_posts/2014-10-29-release.md (+137 -0) 100644 =================================================================== --- /dev/null +++ ja/_posts/2014-10-29-release.md 2014-10-29 23:16:13 +0900 (45adf60) @@ -0,0 +1,137 @@ +--- +layout: post.ja +title: Groonga 4.0.7リリース +description: Groonga 4.0.7をリリースしました! +--- + +## Groonga 4.0.7リリース + +今日は肉の日ですね![Groonga 4.0.7](/ja/docs/news.html#release-4-0-7) をリリースしました! + +それぞれの環境毎のインストール方法: [インストール](/ja/docs/install.html) + +### 変更内容 + +今回は2つの有用な機能が追加されています。まだ実験的な扱いですが、興味のある方はぜひ試してみてフィードバックをおねがいします。 + + * カラム値の圧縮をサポート + * トークンフィルター機能を追加 + +#### カラム値の圧縮をサポート + +今回のリリースでは、カラム値の圧縮をサポートしました。圧縮にはzlibまたはLZ4を使えます。 + +Groongaには[カラム値の合計の上限値が256GiB](/ja/docs/limitations.html#limitations-of-column)という上限がありますが、カラム値を圧縮することにより256GiB以上のデータを扱うことができます。 + +もともとGroongaでは、zlib/LZOを使った圧縮をサポートしてはいたのですが、内部的な実装の都合でメモリリークしてしまうという問題がありました。そのため、機能はあったのですが、 `--with-lzo` や `--with-zlib` 付きでビルドしても使えないようにしていました。 + +今回はそのあたりの実装の問題を[@naoa_y](https://twitter.com/naoa_y)さんのパッチをもとに解決することができました。そのため、今回のリリースから再びzlibの圧縮をサポートしました。なお、LZOをLZ4に変更したのは、LZ4の方が速度が速かったからです。(圧縮率は同じくらいです。)@naoa_yさんが測ってくれた結果([LZOとSnappyの結果](https://github.com/groonga/groonga/pull/221#issuecomment-59627302)、[LZ4の結果](https://github.com/groonga/groonga/pull/223#issue-46381569))では、LZ4よりもSnappyの方が速かったですが、[LZ4のサイト](https://code.google.com/p/lz4/)ではLZ4の方が速いということなのでSnappyではなくLZ4を採用することにしました。 + +実際にカラムを圧縮するには、カラムをつくるときに `COMPRESS_ZLIB` もしくは `COMPRESS_LZ4` を `flags` に指定してください。 + + column_create Entries content COLUMN_SCALAR|COMPRESS_ZLIB Text + column_create Entries content COLUMN_SCALAR|COMPRESS_LZ4 Text + +なお、zlibとLZ4の傾向の違いは次の通りです。 + + * zlibの方が圧縮率はよい + * LZ4の方が圧縮・展開速度が遅い + +まずはLZ4を試してみて、それでもデータ量が多いならzlibを検討するのがよいでしょう。ただ、データ量が多いときはテーブル分割を考慮に入れた方がよいケースもあります。ベンチマークをとりながら検討してください。 + +実際に計測してはいませんが、数バイトや数10バイトなど小さいデータの場合は圧縮する方がサイズが大きくなる可能性があります。(メタ情報を追加したりするため。)そのため、ある程度大きめのデータに対してだけ使うことをオススメします。例えば、タグの値を入れたカラムなどは圧縮する意味はあまりありません。 + +なお、圧縮したカラムでもソートやドリルダウンをできますが、非圧縮のカラムより遅くなります。ただ、大きめのデータの場合(Wikipediaの本文データなど)はソートやドリルダウン対象にすることはないので問題になることはないでしょう。 + +注意:カラム値の圧縮はまだ実験的な機能です。慎重な人はまだ使わないことをオススメしますが、興味のある方はぜひ試してみて、フィードバックをおねがいします。フィードバックとは次のようなものです。 + + * きちんと動いた + * 多くの人からきちんと動いたという報告があれば「実験的な機能」扱いではなく「正式機能」扱いにします。 + * うまく動かなかった + * 修正するので詳細を教えてください。 + * このくらい効果があった + * サイズ面、速度面で報告があると他のユーザーの参考になるので、ベンチマークなどをとってその結果を教えてください。 + +#### トークンフィルター機能を追加 + +今回のリリースではトークンフィルター機能を追加しました。これは、トークナイズ後の各トークンに対して処理を実行できる機能です。例えば、トークンを無視したり変更したりできます。 + +今回のリリースでは、トークンフィルターを2つ追加しました。 + + * [TokenFilterStopWord](/ja/docs/reference/token_filters.html#token-filter-stop-word) + * [TokenFilterStem](/ja/docs/reference/token_filters.html#token-filter-stem) + +追加したトークンフィルターをそれぞれ紹介します。 + +##### `TokenFilterStopWord` + +`TokenFilterStopWord` を使うと文書を検索する時にトークナイズされたトークンからストップワードを除去します。 + + table_create Terms TABLE_PAT_KEY ShortText \ + --default_tokenizer TokenBigram \ + --normalizer NormalizerAuto \ + --token_filters TokenFilterStopWord + column_create Terms memos_content COLUMN_INDEX|WITH_POSITION Memos content + column_create Terms is_stop_word COLUMN_SCALAR Bool + load --table Terms + [ + {"_key": "and", "is_stop_word": true} + ] + +上記のように語彙表に `is_stop_word` カラムを用意して、ストップワードの対象となる語句を `_key` として登録するだけです。ストップワードの `is_stop_word` の値は `true` にしておきましょう。 + +この場合 `and` がストップワードとして登録されているので、検索クエリが `--query "Hello and"` だとしたら、 `and` をストップワードとして扱い、無視します。つまり、 `Hello` で検索したのと同じ結果になります。 + +詳細はドキュメントを参考にしてください。 + + * [TokenFilterStopWord](/ja/docs/reference/token_filters.html#token-filter-stop-word) + +##### `TokenFilterStem` + +`TokenFilterStem` を使うといわゆるステミングを有効にすることができます。 + +`TokenFilterStem` を使うには語彙表テーブルを作成するときに `--token_filters TokenFilterStem` オプションを指定します。 + + table_create Terms TABLE_PAT_KEY ShortText \ + --default_tokenizer TokenBigram \ + --normalizer NormalizerAuto \ + --token_filters TokenFilterStem + +このようにしておくと、 `develop` で検索したときに `develop` だけではなく、 `developing` や `developed` など `develop` を活用した後の検索結果も取得できます。そのため検索漏れを少なくすることができます。 + +詳細はドキュメントを参考にしてください。 + + * [TokenFilterStem](/ja/docs/reference/token_filters.html#token-filter-stem) + +##### 注意 + +トークンフィルター機能も「実験的な機能」扱いです。使ってみた人はぜひフィードバックをおねがいします。現時点では、[TokenFilterStemはMySQLの正規化処理と相性が悪い](http://blog.createfield.com/entry/2014/10/29/084941)ことがわかっています。他にも気づいた点があればぜひ教えてください。 + +### Debianユーザー向け情報 + +Groongaのパッケージが公式Debianリポジトリーに入りました。sidユーザーの人は公式DebianパッケージからGroongaをインストールできます。 + +### Ubuntuユーザー向け情報 + +今回のリリースでは先日リリースされたばかりのUbuntu 14.10に対応しています。Ubuntuユーザーの人も安心してアップグレードしてください。 + +### イベントのお知らせ + +11月29日(土)は、今年も「[全文検索エンジンGroongaを囲む夕べ](http://groonga.doorkeeper.jp/events/15816)」を開催します!次のような内容です。興味のある人はぜひイベントページに登録して、開催を楽しみにしていてください。 + + * 開発者が今年一年の改善点を紹介 + * 開発者が今後の開発の方向性を紹介 + * Groongaを便利に使うためのツールやライブラリーを作っているユーザーがプロダクト紹介 + * ユーザーがGroongaに関することを紹介 + * [検索エンジン自作入門](http://gihyo.jp/book/2014/978-4-7741-6753-4)のサイン会(すでに購入している人は持ってきてください。) + +イベント概要は次の通りです。 + + * 日時: 2014-11-29(土)13:00開場、13:30開始 + * 場所: [GMOインターネットグループ シナジーカフェ GMO Yours](http://www.conoha.jp/community/access) + +### さいごに + +4.0.6からの詳細な変更点は [4.0.7リリース 2014/10/29](/ja/docs/news.html#release-4-0-7) を確認してください。 + +それでは、Groongaでガンガン検索してください! -------------- next part -------------- HTML����������������������������... ダウンロード