diff --git a/_po/ja/reference/operators/prefix-search-v2.po b/_po/ja/reference/operators/prefix-search-v2.po index a4056e98c..d3f0ce258 100644 --- a/_po/ja/reference/operators/prefix-search-v2.po +++ b/_po/ja/reference/operators/prefix-search-v2.po @@ -48,6 +48,7 @@ msgid "" "```sql\n" "column &^ prefix\n" "column &^ (prefix, NULL, index_name)::pgroonga_full_text_search_condition\n" +"column &^ pgroonga_condition(prefix, index_name => 'index_name')\n" "```" msgstr "" @@ -63,6 +64,14 @@ msgstr "" "イズしたノーマライザーを使用するためのものです。\n" "2つ目の使い方は、2.4.6から使えます。" +msgid "" +"The third signature has the same meaning as the second signature.\n" +"You should use this signature in 3.1.6 and above.\n" +"See [`pgroonga_condition` function][condition] for details." +msgstr "" +"3つ目の使い方は2つ目と同じ意味です。3.1.6以降は3つ目の構文を使ってください。" +"詳しくは[`pgroonga_condition`関数][condition]をご覧ください。" + msgid "Here is the description of the first signature." msgstr "以下は1つ目の使い方の説明です。" @@ -230,6 +239,40 @@ msgid "" "```" msgstr "" +msgid "" +"The same query with [`pgroonga_condition` function][condition] is as follows." +msgstr "" +"同じクエリを[`pgroonga_condition`関数][condition]を使うと以下の通りです。" + +msgid "" +"```sql\n" +"EXPLAIN (COSTS OFF)\n" +"SELECT name\n" +" FROM tags\n" +" WHERE name &^ pgroonga_condition('-p_G', index_name => " +"'pgroonga_tag_name_index');\n" +" QUERY " +"PLAN \n" +"-------------------------------------------------------------------------------\n" +" Seq Scan on tags\n" +" Filter: (name &^ '(-p_G,,,,pgroonga_tag_name_index,,)'::" +"pgroonga_condition)\n" +"(2 rows)" +msgstr "" + +msgid "" +"SELECT name\n" +" FROM tags\n" +" WHERE name &^ pgroonga_condition('-p_G', index_name => " +"'pgroonga_tag_name_index');\n" +" name\n" +"-----------\n" +" PGroonga\n" +" pglogical\n" +"(2 rows)\n" +"```" +msgstr "" + msgid "## See also" msgstr "## 参考" @@ -256,6 +299,9 @@ msgstr "" " * [`&^~|`演算子][prefix-rk-search-in-v2]:プレフィックスの配列での前方一致" "RK検索" +msgid " * [`pgroonga_condition` function][condition]" +msgstr " * [`pgroonga_condition`関数][condition]" + msgid "[prefix-rk-search-v2]:prefix-rk-search-v2.html" msgstr "" @@ -267,3 +313,6 @@ msgstr "" msgid "[prefix-rk-search-in-v2]:prefix-rk-search-in-v2.html" msgstr "" + +msgid "[condition]:../functions/pgroonga-condition.html" +msgstr "" diff --git a/ja/reference/operators/prefix-search-v2.md b/ja/reference/operators/prefix-search-v2.md index 92cb4d53f..f923d3583 100644 --- a/ja/reference/operators/prefix-search-v2.md +++ b/ja/reference/operators/prefix-search-v2.md @@ -20,6 +20,7 @@ upper_level: ../ ```sql column &^ prefix column &^ (prefix, NULL, index_name)::pgroonga_full_text_search_condition +column &^ pgroonga_condition(prefix, index_name => 'index_name') ``` 多くの場合は1つ目の使い方で十分です。 @@ -27,6 +28,8 @@ column &^ (prefix, NULL, index_name)::pgroonga_full_text_search_condition 2つ目の使い方はPGroongaのインデックスが使用されるかどうかに関わらず、カスタマイズしたノーマライザーを使用するためのものです。 2つ目の使い方は、2.4.6から使えます。 +3つ目の使い方は2つ目と同じ意味です。3.1.6以降は3つ目の構文を使ってください。詳しくは[`pgroonga_condition`関数][condition]をご覧ください。 + 以下は1つ目の使い方の説明です。 ```sql @@ -141,6 +144,29 @@ SELECT name (2 rows) ``` +同じクエリを[`pgroonga_condition`関数][condition]を使うと以下の通りです。 + +```sql +EXPLAIN (COSTS OFF) +SELECT name + FROM tags + WHERE name &^ pgroonga_condition('-p_G', index_name => 'pgroonga_tag_name_index'); + QUERY PLAN +------------------------------------------------------------------------------- + Seq Scan on tags + Filter: (name &^ '(-p_G,,,,pgroonga_tag_name_index,,)'::pgroonga_condition) +(2 rows) + +SELECT name + FROM tags + WHERE name &^ pgroonga_condition('-p_G', index_name => 'pgroonga_tag_name_index'); + name +----------- + PGroonga + pglogical +(2 rows) +``` + ## 参考 * [`&^~`演算子][prefix-rk-search-v2]:前方一致RK検索 @@ -151,6 +177,8 @@ SELECT name * [`&^~|`演算子][prefix-rk-search-in-v2]:プレフィックスの配列での前方一致RK検索 + * [`pgroonga_condition`関数][condition] + [prefix-rk-search-v2]:prefix-rk-search-v2.html [prefix-search-in-v2]:prefix-search-in-v2.html @@ -158,3 +186,5 @@ SELECT name [not-prefix-search-in-v2]:not-prefix-search-in-v2.html [prefix-rk-search-in-v2]:prefix-rk-search-in-v2.html + +[condition]:../functions/pgroonga-condition.html diff --git a/reference/operators/prefix-search-v2.md b/reference/operators/prefix-search-v2.md index da11910c7..609a42190 100644 --- a/reference/operators/prefix-search-v2.md +++ b/reference/operators/prefix-search-v2.md @@ -20,6 +20,7 @@ Prefix search is useful for implementing input completion. ```sql column &^ prefix column &^ (prefix, NULL, index_name)::pgroonga_full_text_search_condition +column &^ pgroonga_condition(prefix, index_name => 'index_name') ``` The first signature is enough for most cases. @@ -27,6 +28,10 @@ The first signature is enough for most cases. The second signature is for using custom normalizer even if PGroonga's index is used or not. The second signature is available since 2.4.6. +The third signature has the same meaning as the second signature. +You should use this signature in 3.1.6 and above. +See [`pgroonga_condition` function][condition] for details. + Here is the description of the first signature. ```sql @@ -141,6 +146,29 @@ SELECT name (2 rows) ``` +The same query with [`pgroonga_condition` function][condition] is as follows. + +```sql +EXPLAIN (COSTS OFF) +SELECT name + FROM tags + WHERE name &^ pgroonga_condition('-p_G', index_name => 'pgroonga_tag_name_index'); + QUERY PLAN +------------------------------------------------------------------------------- + Seq Scan on tags + Filter: (name &^ '(-p_G,,,,pgroonga_tag_name_index,,)'::pgroonga_condition) +(2 rows) + +SELECT name + FROM tags + WHERE name &^ pgroonga_condition('-p_G', index_name => 'pgroonga_tag_name_index'); + name +----------- + PGroonga + pglogical +(2 rows) +``` + ## See also * [`&^~` operator][prefix-rk-search-v2]: Prefix RK search @@ -151,6 +179,8 @@ SELECT name * [`&^~|` operator][prefix-rk-search-in-v2]: Prefix RK search by an array of prefixes + * [`pgroonga_condition` function][condition] + [prefix-rk-search-v2]:prefix-rk-search-v2.html [prefix-search-in-v2]:prefix-search-in-v2.html @@ -158,3 +188,5 @@ SELECT name [not-prefix-search-in-v2]:not-prefix-search-in-v2.html [prefix-rk-search-in-v2]:prefix-rk-search-in-v2.html + +[condition]:../functions/pgroonga-condition.html