Kouhei Sutou
null+****@clear*****
Sat Oct 24 16:25:15 JST 2015
Kouhei Sutou 2015-10-24 16:25:15 +0900 (Sat, 24 Oct 2015) New Revision: 0bfa49518b148c1a2adf5292b6b0f0882a31e7d0 https://github.com/pgroonga/pgroonga.github.io/commit/0bfa49518b148c1a2adf5292b6b0f0882a31e7d0 Message: Translate pgroonga.score Added files: _po/ja/reference/functions/pgroonga-score.po ja/reference/functions/pgroonga-score.md Modified files: ja/reference/jsonb.md ja/tutorial/index.md reference/functions/pgroonga-score.md Added: _po/ja/reference/functions/pgroonga-score.po (+133 -0) 100644 =================================================================== --- /dev/null +++ _po/ja/reference/functions/pgroonga-score.po 2015-10-24 16:25:15 +0900 (c422f2f) @@ -0,0 +1,133 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"PO-Revision-Date: 2015-10-24 16:24+0900\n" +"Language: ja\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +msgid "" +"---\n" +"title: pgroonga.score function\n" +"layout: en\n" +"---" +msgstr "" +"---\n" +"title: pgroonga.score関数\n" +"layout: ja\n" +"---" + +msgid "# `pgroonga.score` function" +msgstr "# `pgroonga.score`関数" + +msgid "## Summary" +msgstr "## 概要" + +msgid "" +"`pgroonga.score` function returns precision as a number. If a record is more p" +"recision against searched query, the record has more higher number." +msgstr "" +"`pgroonga.score`関数はマッチした度合いを数値で返します。もし、検索したクエリーに対してそのレコードがマッチしているほどそのレコードのスコアー" +"は高い数値になります。" + +msgid "## Syntax" +msgstr "## 構文" + +msgid "" +"You can use `pgroonga.score` function to get precision as a number. If a recor" +"d is more precision against searched query, the record has more higher number." +msgstr "" +"`pgroonga.score`関数を使うとマッチした度合いを数値で取得することができます。検索したクエリーに対してよりマッチしているレコードほど高い数値に" +"なります。" + +msgid "" +"```text\n" +"double precision pgroonga.score(record)\n" +"```" +msgstr "" + +msgid "`record` is a table name." +msgstr "`record`はテーブル名です。" + +msgid "Assume that you have the following schema:" +msgstr "次のスキーマが定義されているとします。" + +msgid "" +"```sql\n" +"CREATE TABLE score_memos (\n" +" id integer PRIMARY KEY,\n" +" content text\n" +");" +msgstr "" + +msgid "" +"CREATE INDEX pgroonga_score_memos_content_index\n" +" ON score_memos\n" +" USING pgroonga (id, content);\n" +"```" +msgstr "" + +msgid "`record` must be `score_memos`:" +msgstr "`record`は`score_memos`にします。" + +msgid "" +"```sql\n" +"SELECT *, pgroonga.score(score_memos)\n" +" FROM score_memos\n" +" WHERE content %% 'PGroonga';\n" +"```" +msgstr "" + +msgid "`pgroonga.score` function return precision as `double precision` type value." +msgstr "`pgroonga.score`関数は`double precision`型の値でマッチした度合いを返します。" + +msgid "## Usage" +msgstr "## 使い方" + +msgid "" +"You need to add primary key column into `pgroonga` index to use `pgroonga.scor" +"e` function. If you don't add primary key column into `pgroonga` index, `pgroo" +"nga.score` function always returns `0.0`." +msgstr "" +"`pgroonga.score`関数を使うには、`pgroonga`インデックスにプライマリーキーに指定したカラムを追加する必要があります。もし、プライマリ" +"ーキーに指定したカラムを`pgroonga`インデックスに追加していない場合は、`pgroonga.score`関数は常に`0.0`を返します。" + +msgid "" +"`pgroonga.score` function always returns `0.0` when full text search isn't per" +"formed by index. In other words, `pgroonga.score` function always returns `0.0" +"` when full text search is performed by sequential scan." +msgstr "" +"`pgroonga.score`関数はインデックスを使わずに全文検索した場合は常に`0.0`を返します。言い換えると、`pgroonga.score`関数は" +"シーケンシャルスキャンで全文検索を実行した場合は常に`0.0`を返します。" + +msgid "" +"If `pgroonga.score` function returns `0.0` unexpectedly, confirm the following" +"s:" +msgstr "もし、`pgroonga.score`関数が意図せずに`0.0`を返しているときは、次のことを確認してください。" + +msgid "" +" * Whether the column that is specified as primary key is included in index t" +"argets of the PGroonga index or not\n" +" * Whether the full text search is performed by index or not" +msgstr "" +" * プライマリーキーに指定しているカラムがPGroongaのインデックス対象に含まれているかどうか\n" +" * インデックスを使って全文検索されているかどうか" + +msgid "" +"Score is \"how many keywords are included\" (TF, Term Frequency) for now. Groong" +"a supports customizing how to score. But PGroonga doesn't support yet it for n" +"ow." +msgstr "" +"現在のところ、スコアーの値は「何個キーワードが含まれていたか」(TF、Term Frequency)です。Groongaはどのようにスコアーを計算するかをカ" +"スタマイズすることができます。しかし、PGroongaはまだその機能をサポートしていません。" + +msgid "See [examples in tutorial](../../tutorial/#score)." +msgstr "[チュートリアルの中の例](../../tutorial/#score)を参考にしてください。" + +msgid "## See also" +msgstr "## 参考" + +msgid " * [Examples in tutorial](../../tutorial/#score)" +msgstr " * [チュートリアルの中の例](../../tutorial/#score)" Added: ja/reference/functions/pgroonga-score.md (+64 -0) 100644 =================================================================== --- /dev/null +++ ja/reference/functions/pgroonga-score.md 2015-10-24 16:25:15 +0900 (cf098f6) @@ -0,0 +1,64 @@ +--- +title: pgroonga.score関数 +layout: ja +--- + +# `pgroonga.score`関数 + +## 概要 + +`pgroonga.score`関数はマッチした度合いを数値で返します。もし、検索したクエリーに対してそのレコードがマッチしているほどそのレコードのスコアーは高い数値になります。 + +## 構文 + +`pgroonga.score`関数を使うとマッチした度合いを数値で取得することができます。検索したクエリーに対してよりマッチしているレコードほど高い数値になります。 + +```text +double precision pgroonga.score(record) +``` + +`record`はテーブル名です。 + +次のスキーマが定義されているとします。 + +```sql +CREATE TABLE score_memos ( + id integer PRIMARY KEY, + content text +); + +CREATE INDEX pgroonga_score_memos_content_index + ON score_memos + USING pgroonga (id, content); +``` + +`record`は`score_memos`にします。 + +```sql +SELECT *, pgroonga.score(score_memos) + FROM score_memos + WHERE content %% 'PGroonga'; +``` + +`pgroonga.score`関数は`double precision`型の値でマッチした度合いを返します。 + +## 使い方 + +`pgroonga.score`関数を使うには、`pgroonga`インデックスにプライマリーキーに指定したカラムを追加する必要があります。もし、プライマリーキーに指定したカラムを`pgroonga`インデックスに追加していない場合は、`pgroonga.score`関数は常に`0.0`を返します。 + +`pgroonga.score`関数はインデックスを使わずに全文検索した場合は常に`0.0`を返します。言い換えると、`pgroonga.score`関数はシーケンシャルスキャンで全文検索を実行した場合は常に`0.0`を返します。 + +もし、`pgroonga.score`関数が意図せずに`0.0`を返しているときは、次のことを確認してください。 + + * プライマリーキーに指定しているカラムがPGroongaのインデックス対象に含まれているかどうか + * インデックスを使って全文検索されているかどうか + +現在のところ、スコアーの値は「何個キーワードが含まれていたか」(TF、Term Frequency)です。Groongaはどのようにスコアーを計算するかをカスタマイズすることができます。しかし、PGroongaはまだその機能をサポートしていません。 + +## 使い方 + +[チュートリアルの中の例](../../tutorial/#score)を参考にしてください。 + +## 参考 + + * [チュートリアルの中の例](../../tutorial/#score) Modified: ja/reference/jsonb.md (+5 -5) =================================================================== --- ja/reference/jsonb.md 2015-10-24 15:58:44 +0900 (9d703ca) +++ ja/reference/jsonb.md 2015-10-24 16:25:15 +0900 (c044ed8) @@ -5,11 +5,11 @@ layout: ja # `jsonb`サポート -PGroongaは`jsonb`型もサポートしています。PGroongaを使うと複数のキー・値に対して条件を指定してJSONデータを検索できます。 +PGroongaは`jsonb`型にも対応しています。PGroongaを使うとJSON中のキー・値に対して検索することができます。 -JSON内のすべてのテキスト値に対して全文検索をしてJSONデータを検索することもできます。これはPostgreSQL組み込みの機能でも[JsQuery](https://github.com/postgrespro/jsquery)でもサポートしていない機能です。 +JSON中のすべてのテキスト値に対して全文検索することもできます。これはPGroonga独自の機能です。PostgreSQL組み込みの機能でも[JsQuery](https://github.com/postgrespro/jsquery)でもこの機能はサポートしていません。 -次のようなJSONを考えてください。 +次のJSONを考えてください。 ```json { @@ -21,11 +21,11 @@ JSON内のすべてのテキスト値に対して全文検索をしてJSONデー } ``` -`search`でも`example`でも`web`でもどの単語で全文検索してもこのJSONを検索することができます。なぜなら、すべてのテキスト値が全文検索対象だからです。 +`search`、`example`、`web`のどれで全文検索してもこのJSONを見つけることができます。なぜなら、すべてのテキスト値が全文検索対象だからです。 ## 演算子 -PGroongaは`jsonb`型の値で検索するために次の2つの演算子を提供しています。 +PGroongaは`jsonb`に対して検索するために次の2つの演算子を提供しています。 * [`@>`演算子](operators/jsonb-contain.html) * [`@@`演算子](operators/jsonb-query.html) Modified: ja/tutorial/index.md (+5 -5) =================================================================== --- ja/tutorial/index.md 2015-10-24 15:58:44 +0900 (75b3668) +++ ja/tutorial/index.md 2015-10-24 16:25:15 +0900 (e58575f) @@ -433,11 +433,11 @@ SELECT * FROM products WHERE tags %% 'PostgreSQL'; ## JSONに対してPGroongaを使う方法 -PGroongaは`jsonb`型もサポートしています。PGroongaを使うと複数のキー・値に対して条件を指定してJSONデータを検索できます。 +PGroongaは`jsonb`型にも対応しています。PGroongaを使うとJSON中のキー・値に対して検索することができます。 -JSON内のすべてのテキスト値に対して全文検索をしてJSONデータを検索することもできます。これはPostgreSQL組み込みの機能でも[JsQuery](https://github.com/postgrespro/jsquery)でもサポートしていない機能です。 +JSON中のすべてのテキスト値に対して全文検索することもできます。これはPGroonga独自の機能です。PostgreSQL組み込みの機能でも[JsQuery](https://github.com/postgrespro/jsquery)でもこの機能はサポートしていません。 -次のようなJSONを考えてください。 +次のJSONを考えてください。 ```json { @@ -449,9 +449,9 @@ JSON内のすべてのテキスト値に対して全文検索をしてJSONデー } ``` -`search`でも`example`でも`web`でもどの単語で全文検索してもこのJSONを検索することができます。なぜなら、すべてのテキスト値が全文検索対象だからです。 +`search`、`example`、`web`のどれで全文検索してもこのJSONを見つけることができます。なぜなら、すべてのテキスト値が全文検索対象だからです。 -PGroongaは`jsonb`型の値で検索するために次の2つの演算子を提供しています。 +PGroongaは`jsonb`に対して検索するために次の2つの演算子を提供しています。 * `@>`演算子 * `@@`演算子 Modified: reference/functions/pgroonga-score.md (+1 -1) =================================================================== --- reference/functions/pgroonga-score.md 2015-10-24 15:58:44 +0900 (312cf4e) +++ reference/functions/pgroonga-score.md 2015-10-24 16:25:15 +0900 (9074cb4) @@ -46,7 +46,7 @@ SELECT *, pgroonga.score(score_memos) You need to add primary key column into `pgroonga` index to use `pgroonga.score` function. If you don't add primary key column into `pgroonga` index, `pgroonga.score` function always returns `0.0`. -`pgroonga.score` function always returns `0.0` when full text search isn't performed by index. In other words, `pgroonga.score` function always returns `0` when full text search is performed by sequential scan. +`pgroonga.score` function always returns `0.0` when full text search isn't performed by index. In other words, `pgroonga.score` function always returns `0.0` when full text search is performed by sequential scan. If `pgroonga.score` function returns `0.0` unexpectedly, confirm the followings: -------------- next part -------------- HTML����������������������������... Download