HAYASHI Kentaro
null+****@clear*****
Fri Jul 26 11:49:22 JST 2013
HAYASHI Kentaro 2013-07-26 11:49:22 +0900 (Fri, 26 Jul 2013) New Revision: b05682054def779e1de60d68f25f2ca130fab22c https://github.com/groonga/groonga.org/commit/b05682054def779e1de60d68f25f2ca130fab22c Message: blog: add 3.0.6 release entry Added files: en/_posts/2013-07-29-release.textile ja/_posts/2013-07-29-release.textile Added: en/_posts/2013-07-29-release.textile (+94 -0) 100644 =================================================================== --- /dev/null +++ en/_posts/2013-07-29-release.textile 2013-07-26 11:49:22 +0900 (94073ab) @@ -0,0 +1,94 @@ +--- +layout: post.en +title: Groonga 3.0.6 has been released +description: Groonga 3.0.6 has been released! +published: false +--- + + +h2. Groonga 3.0.6 has been released + +"Groonga 3.0.6":/docs/news.html#release-3-0-6 has been released! + +How to install: "Install":/docs/install.html + +There are two topics for this release. + +* Supported backslash escape in query syntax +* Supported Fedora 19 + +h3. Supported backslash escape in query syntax + +In this release, we began to support backslash escape in query syntax. + +See "escape":http://groonga.org/docs/reference/grn_expr/query_syntax.html#escape documentation about sepecial characters which needs escape in query syntax. + +For example, there is a special character such as @(@. If you want to search @(@ itself, you need to pass @\(@ to groonga. + +But, there are some layers until query is actually passed, you need to escape carefully. + +There are three layers between shell and query parser. + +* Shell (such as bash, ...) +* groonga command line interface (groonga command prompt) +* groonga query parser + +In fact, you need to pass @\(@ to groonga query parser. To accomplish above, consider how to escape each layer. + +* groonga query parser requires @\(@ +* groonga command line interface consumes escape, so @\\\(@ is required. +* Shell consumes escape, so @\\\\\\(@ is required. + +Confirm above step by step. + +Here is the sample schema and data (escape.grn): + +<pre> +table_create Memos TABLE_PAT_KEY ShortText + +table_create Contents TABLE_PAT_KEY ShortText --default_tokenizer TokenDelimit --normalizer NormalizerAuto +column_create Contents entries_key_index COLUMN_INDEX Memos _key + +load --table Memos +[ +{"_key": "(example)"} +] +</pre> + +Load sample schema and data (Zsh command line for example): + +<pre> +% groonga -n testdb/db < escape.grn +</pre> + +Here is the escaped query to search '(example' on shell layer. + +<pre> +% groonga testdb/db select Memos --match_columns _key --query "\\\\\\(example" +</pre> + +Here is the escaped query to search '(example' on groonga command line interface layer. + +<pre> +% groonga testdb/db +> select Memos --match_columns _key --query "\\\(example" +</pre> + +We show the concrete example how to escape on each layer in the case which use double quote. The similar rule is applied even though single quote. + +h3. Supported Fedora 19 + +In this release, we began to support Fedora 19 which is released at July 2, 2013. + +Instead, we have stopped Fedora 18 support. + +We have been released rpm packages under Fedora projects, but there is a time lag until rpm packages are released from Fedora projects repository. +So we also provide rpm packages under groonga repository. + +As the contents of rpm packages is same, there is no difference between groonga reppsitory's rpm and Fedora projects's rpm. + +h3. Conclusion + +See "Release 3.0.6 2013/07/29":/docs/news.html#release-3-0-6 about detailed changes since 3.0.5. + +Let's search by groonga! Added: ja/_posts/2013-07-29-release.textile (+109 -0) 100644 =================================================================== --- /dev/null +++ ja/_posts/2013-07-29-release.textile 2013-07-26 11:49:22 +0900 (279fc37) @@ -0,0 +1,109 @@ +--- +layout: post.ja +title: groonga 3.0.6リリース +description: groonga 3.0.6をリリースしました! +published: false +--- + +今日は肉の日ですね。 + +h2. groonga 3.0.6リリース + +"groonga 3.0.6":/ja/docs/news.html#release-3-0-6 をリリースしました! + +それぞれの環境毎のインストール方法: "インストール":/ja/docs/install.html + + +これまでも、groonga.orgにて "利用事例":http://groonga.org/ja/users/ を紹介してきましたが、それとは別に、 "gihyo.jp":http://gihyo.jp/ にてgroonga関連の記事の連載を "隔週連載groonga":http://gihyo.jp/dev/clip/01/groonga としてはじめました。 + +まだgroongaを知らない人にもWebの連載記事を通じて知ってもらいたいというのが動機です。現在第7回まで公開しています。先月は第6回までだったので記事が一本新たに追加されました。 + +* "第7回 [実録] MySQL向け全文検索エンジン「Tritonn」から「mroonga」への移行ガイド(2)":http://gihyo.jp/dev/clip/01/groonga/0007 + +第一回から第六回までの過去記事については "隔週連載groonga":http://gihyo.jp/dev/clip/01/groonga のページを参照してください。 + +h3. クエリ構文で特別な文字のエスケープのサポート + +今回のリリースではクエリ構文で特別な文字のエスケープのサポートをしました。 + +クエリ構文における特別扱いされる文字の詳細については "エスケープ":http://groonga.org/ja/docs/reference/grn_expr/query_syntax.html#escape を参照してください。 + +例えば、特別な文字の一つである @(@ そのものを検索したいときには、 @\(@ をgroongaに渡してあげれば良いことになります。 + +ただし、実際にgroongaに渡すまでにはいくつか以下のような階層があるので使い方には注意が必要です。(下になるにつれてより低レイヤ) + +* シェル(bashなど) +* groongaのコマンラインインタフェース(groongaコマンドのプロンプト) +* groongaのクエリパーサー + +ここでのエスケープとはgroongaのクエリパーサーに @\(@ が渡されるようにしなければなりません。 +そのため、 @\@ をその上位層で解釈してしまう場合にはそのことを踏まえてエスケープしないといけません。 + +この場合低レイヤから逆にたどって考えてみましょう。 + +* groongaのクエリパーサーは @\(@ が渡される必要がある +* groongaのコマンラインインタフェースはエスケープを解釈するので @\\\(@ が必要。 +* シェル(bashなど)もエスケープを解釈するので @\\\\\\(@ が必要。 + +最終的にシェルのコマンドプロンプトでクエリを実行する場合には @\\\\\\(@ としなければなりません。 + +これを具体例で確認してみましょう。サンプルデータとスキーマは以下とします。(escape.grn) + +<pre> +table_create Memos TABLE_PAT_KEY ShortText + +table_create Contents TABLE_PAT_KEY ShortText --default_tokenizer TokenDelimit --normalizer NormalizerAuto +column_create Contents entries_key_index COLUMN_INDEX Memos _key + +load --table Memos +[ +{"_key": "(仮)"} +] +</pre> + +サンプルデータとスキーマのファイルescape.grnをシェルのコマンドプロンプトから投入します。 + +<pre> +% groonga -n testdb/db < escape.grn +</pre> + +この状態で @(仮@ を検索するには以下のクエリを実行します。 + +<pre> +% groonga testdb/db select Memos --match_columns _key --query "\\\\\\(仮" +</pre> + +シングルクォートの場合には以下のクエリで検索できます。 + +<pre> +% groonga testdb/db select Memos --match_columns _key --query '\\\(仮' +</pre> + +では、groongaのコマンドラインインタフェースから検索する場合を確認してみます。groongaのコマンドラインインタフェースの場合にはシェルによるエスケープの解釈がなくなるので、そのぶんのエスケープが不要です。 + +<pre> +% groonga testdb/db +> select Memos --match_columns _key --query "\\\(仮" +</pre> + +シングルクォートの場合には以下のクエリで検索できます。 + +<pre> +> select Memos --match_columns _key --query '\\(仮' +</pre> + +h3. Fedora 19のサポート + +今回のリリースでは、7月2日にリリースされたFedora 19のサポートを開始しました。 + +そのかわり、Fedora 18のサポートは終了しています。 + +Fedoraプロジェクトにてパッケージのリリースをしていますが、Fedoraの一般ユーザが利用するリポジトリに入るまでに2週間程度のタイムラグがあるので、独自にリポジトリでもパッケージを提供しています。 + +パッケージの内容は同じなので、独自のリポジトリからyumでインストールするのとFedoraプロジェクトからyumでインストールのに違いはありません。 + +h3. さいごに + +3.0.5からの詳細な変更点は "3.0.6リリース 2013/07/29":/ja/docs/news.html#release-3-0-6 を確認してください。 + +それでは、groongaでガンガン検索してください! -------------- next part -------------- HTML����������������������������...Download