[Groonga-commit] groonga/groonga.org at 333e4c9 [gh-pages] blog ja: add release announce for PGroonga 0.8.0

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Sep 2 19:09:59 JST 2015


Kouhei Sutou	2015-09-02 19:09:59 +0900 (Wed, 02 Sep 2015)

  New Revision: 333e4c97167cd2492307c9c1ffaf2700be0f8794
  https://github.com/groonga/groonga.org/commit/333e4c97167cd2492307c9c1ffaf2700be0f8794

  Message:
    blog ja: add release announce for PGroonga 0.8.0

  Added files:
    ja/_posts/2015-09-01-pgroonga-0.8.0.md

  Added: ja/_posts/2015-09-01-pgroonga-0.8.0.md (+124 -0) 100644
===================================================================
--- /dev/null
+++ ja/_posts/2015-09-01-pgroonga-0.8.0.md    2015-09-02 19:09:59 +0900 (a9a8dd3)
@@ -0,0 +1,124 @@
+---
+layout: post.ja
+title: PGroonga(ぴーじーるんが) 0.8.0リリース
+description: PGroonga(ぴーじーるんが) 0.8.0をリリースしました!
+---
+
+## PGroonga(ぴーじーるんが) 0.8.0リリース
+
+PostgreSQLからGroongaを使えるようにする[PGroonga](https://github.com/pgroonga/pgroonga)の0.8.0をリリースしました!
+
+  * [インストール方法](https://github.com/pgroonga/pgroonga#%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB)
+
+PGroongaについてやPGroongaと他の類似システムとの違いについては[PGroonga 0.2.0のリリースアナウンス](../../01/29/pgroonga-0.2.0.html)を参考にしてください。
+
+0.8.0は0.7.0と互換性があるので、PGroonga用のインデックスを再作成する必要はありません。PGroongaをアップグレードし、接続しなおせばPGroonga 0.8.0になります。
+
+PGroongaの速度については次の記事を参考にしてください。
+
+  * [PostgreSQLで日本語全文検索 - LIKEとpg_bigmとPGroonga - ククログ(2015-05-25)](http://www.clear-code.com/blog/2015/5/25.html)
+
+## 0.8.0での変更点
+
+0.6.0からの変更点は次の通りです。(0.7.0のリリースアナウンスをしていなかったので0.7.0の変更点も含みます。)
+
+  * 非互換:これまではPGroongaのログはPostgreSQLのログ出力の仕組みを使って出力していましたが、ファイルに出力するように変更しました。この挙動は`pgroonga.log_type`(後述)と`pgroonga.log_path`(後述)で変更できます。
+  * [`pgroonga.log_type`](https://github.com/pgroonga/pgroonga#pgroongalog_type%E5%A4%89%E6%95%B0): ログの出力方法を変更する変数を追加しました。ファイル、Windowsイベントログ、PostgreSQLのログ出力機構、のどれかを選べます。
+  * [`pgroonga.log_path`](https://github.com/pgroonga/pgroonga#pgroongalog_path%E5%A4%89%E6%95%B0): ファイルにログを出力するときの出力先のファイル名を変更する変数を追加しました。
+  * [`pgroonga.log_level`](https://github.com/pgroonga/pgroonga#pgroongalog_level%E5%A4%89%E6%95%B0): ログレベルを変更する変数を追加しました。
+  * [`pgroonga.snippet_html`](https://github.com/pgroonga/pgroonga#pgroongasnippet_html%E9%96%A2%E6%95%B0): 指定したテキストから指定したキーワード周辺のテキストを抽出する関数を追加しました。よくWeb検索エンジンの検索結果に表示されているやつです。PGroongaの全文検索機能に依存していないので、この関数単独でも使えます。
+  * Ubuntu 14.04 TLS (Trusty Tahr)のパッケージ提供を開始しました。
+  * `TRUNCATE`すると動かなくなる問題を修正しました。
+  * `VACUUM`時の処理を高速化しました。
+
+`pgroonga.log_type`のWindowsイベントログ出力と`pgroonga.snippet_html`関数は少し細くします。
+
+### `pgroonga.log_type`のWindowsイベントログ出力
+
+次のように設定するとWindowsイベントログとしてログを出力できます。(通常は↓のようにSQLで設定せずに`postgresql.conf`に書いて設定します。)
+
+```sql
+SET pgroonga.log_type = 'windows_event_log';
+```
+
+これだけでWindowsイベントログに記録されるのですが、この状態でイベントビューアーで表示すると警告メッセージがでてログを確認しづらいです。
+
+次のようにコマンドプロンプトから「PGroonga」というイベントを登録することで、警告メッセージが消えて確認しやすくなります。Windowsイベントログを使うときは設定することをオススメします。
+
+```text
+> regsvr32 /n /i:PGroonga ${PostgreSQLをインストールしたフォルダ}\lib\pgevent.dll
+```
+
+なお、この手順はPostgreSQLでWindowsイベントログを利用する場合の手順と同様です。参考:[WindowsにおけるEvent Logの登録](https://www.postgresql.jp/document/9.4/html/event-log-registration.html)
+
+### `pgroonga.snippet_html`関数
+
+`pgroonga.snippet_html`関数を使うと該当テキスト中からキーワードが含まれている箇所の周辺テキストを抽出できます。Web検索エンジンは検索結果にこの情報を含めていることが多いので見たことがあるはずです。
+
+例として、次のテキスト(Groongaの説明文)を使います。
+
+> Groonga is a fast and accurate full text search engine based on
+> inverted index. One of the characteristics of Groonga is that a
+> newly registered document instantly appears in search results.
+> Also, Groonga allows updates without read locks. These characteristics
+> result in superior performance on real-time applications.
+
+
+このテキストの中には「`fast`」というキーワードが含まれています。`pgroonga.snippet_html`を使うと「`fast`」周辺のテキストを抽出します。キーワードは「`<span class="keyword">`」と「`</span>`」で囲まれます。`pgroonga.snippet_html`の`html`はHTMLとして出力するという意味だということです。
+
+> Groonga is a <span class="keyword">fast</span> and accurate full
+> text search engine based on inverted index. One of the
+> characteristics of Groonga is that a newly registered document
+> instantly appears in search results. Also, Gro
+
+なお、この機能はPGroongaで検索した結果以外にも使えます。そのため、次のように`FROM`なしの`SELECT`でも使えます。なお、[`unnest`](http://www.postgresql.org/docs/devel/static/functions-array.html)は配列を行にするPostgreSQLの関数です。
+
+```sql
+SELECT unnest(pgroonga.snippet_html(
+  'Groonga is a fast and accurate full text search engine based on ' ||
+  'inverted index. One of the characteristics of Groonga is that a ' ||
+  'newly registered document instantly appears in search results. ' ||
+  'Also, Groonga allows updates without read locks. These characteristics ' ||
+  'result in superior performance on real-time applications.' ||
+  '\n' ||
+  '\n' ||
+  'Groonga is also a column-oriented database management system (DBMS). ' ||
+  'Compared with well-known row-oriented systems, such as MySQL and ' ||
+  'PostgreSQL, column-oriented systems are more suited for aggregate ' ||
+  'queries. Due to this advantage, Groonga can cover weakness of ' ||
+  'row-oriented systems.',
+  ARRAY['fast', 'PostgreSQL']));
+                                                                                 --                                unnest                                                                                                                 
+-- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+--  Groonga is a <span class="keyword">fast</span> and accurate full text search engine based on inverted index. One of the characteristics of Groonga is that a newly registered document instantly appears in search results. Also, Gro
+--  ase management system (DBMS). Compared with well-known row-oriented systems, such as MySQL and <span class="keyword">PostgreSQL</span>, column-oriented systems are more suited for aggregate queries. Due to this advantage, Groonga
+-- (2 rows)
+```
+
+`pgroonga.snippet_html`の使い方は次の通りです。
+
+```text
+pgroonga.snippet_html(target, ARRAY[keyword1, keyword2, ...])
+```
+
+`target`は`text`型の値でキーワード抽出対象のテキストを指定します。
+
+`keyword1`, `keyword2`, `...`は`text`型の配列で、抽出対象のテキストを指定します。1つ以上指定してします。
+
+`pgroonga.snippet_html`は`text`型の配列を返します。
+
+配列の各要素にはキーワード周辺のテキストが含まれています。キーワードは「`<span class="keyword">`」と「`</span>`」で囲まれ、元のテキストに含まれる`<`, `>`, `&`, `"`はHTMLエスケープされます。
+
+各要素に含まれる元テキストは最大200バイトになります。文字数ではなくバイト数です。これに加えて「`<span class="keyword">`」と「`</span>`」が増え、`<`や`>`を`&lt;`, `&gt;`などに変換するので、各要素のテキストは200バイト以上になることがあります。
+
+## おねがい
+
+PGroongaは毎月のリリースを重ねて、性能も使い勝手も向上してきました。上述のベンチマーク結果を見ると実用になる速度がでていることがわかります。
+
+すでに実際に利用している人たちもいます。まだ利用していない人は、ぜひ、自分たちのシステムで実用できるか検討してみてください。PGroongaは既存の優秀な全文検索エンジンGroongaを利用しているため性能は折り紙つきです。(検討結果を広く公開してもらえると他のPostgreSQLユーザーに有益です!)
+
+また、公式サイト公開に向けて協力してくれる人も募集しています。[http://pgroonga.github.io/](http://pgroonga.github.io/)で英語でも情報も公開しようと進めています。コードは書けないけど英語は書ける、デザインはできるなど協力してくれる方は[GitHubのIssue](https://github.com/pgroonga/pgroonga.github.io/issues/3)にコメントを書いてください。まずは[README](https://github.com/pgroonga/pgroonga/blob/master/README.md)を英語に翻訳する作業があります。
+
+## まとめ
+
+最新のPostgreSQLでGroongaを使えるようにするPGroongaの新しいバージョンをリリースしました。PostgreSQLで日本語全文検索をしたいという方はぜひ試してみてください!
-------------- next part --------------
HTML����������������������������...
下载 



More information about the Groonga-commit mailing list
Back to archive index