[Groonga-commit] pgroonga/pgroonga.github.io at be5638f [master] Use English data for tutorial

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Oct 25 21:34:05 JST 2015


Kouhei Sutou	2015-10-25 21:34:05 +0900 (Sun, 25 Oct 2015)

  New Revision: be5638f5939c163c93fc2edfb901d74aa65fecee
  https://github.com/pgroonga/pgroonga.github.io/commit/be5638f5939c163c93fc2edfb901d74aa65fecee

  Message:
    Use English data for tutorial

  Modified files:
    _po/ja/tutorial/index.po
    ja/tutorial/index.md
    tutorial/index.md

  Modified: _po/ja/tutorial/index.po (+125 -14)
===================================================================
--- _po/ja/tutorial/index.po    2015-10-25 21:03:53 +0900 (7ad6aad)
+++ _po/ja/tutorial/index.po    2015-10-25 21:34:05 +0900 (36831e8)
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"PO-Revision-Date: 2015-10-25 21:01+0900\n"
+"PO-Revision-Date: 2015-10-25 21:33+0900\n"
 "Language: ja\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -120,13 +120,22 @@ msgstr "テストデータを挿入します。"
 
 msgid ""
 "```sql\n"
+"INSERT INTO memos VALUES (1, 'PostgreSQL is a relational database management s"
+"ystem.');\n"
+"INSERT INTO memos VALUES (2, 'Groonga is a fast full text search engine that s"
+"upports all languages.');\n"
+"INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Gro"
+"onga as index.');\n"
+"INSERT INTO memos VALUES (4, 'There is groonga command.');\n"
+"```"
+msgstr ""
+"```sql\n"
 "INSERT INTO memos VALUES (1, 'PostgreSQLはリレーショナル・データベース管理システムです。');\n"
 "INSERT INTO memos VALUES (2, 'Groongaは日本語対応の高速な全文検索エンジンです。');\n"
 "INSERT INTO memos VALUES (3, 'PGroongaはインデックスとしてGroongaを使うためのPostgreSQLの拡張機能です"
 "。');\n"
 "INSERT INTO memos VALUES (4, 'groongaコマンドがあります。');\n"
 "```"
-msgstr ""
 
 msgid "Disable sequential scan to ensure using `pgroonga` index:"
 msgstr "確実に`pgroonga`インデックスを使うためにシーケンシャルスキャンを無効にします。"
@@ -162,16 +171,24 @@ msgstr "1語で全文検索を実行する場合は`%%`演算子を使います
 
 msgid ""
 "```sql\n"
-"SELECT * FROM memos WHERE content %% '全文検索';"
+"SELECT * FROM memos WHERE content %% 'engine';\n"
+"--  id |                                content                               "
+"  \n"
+"-- ----+----------------------------------------------------------------------"
+"--\n"
+"--   2 | Groonga is a fast full text search engine that supports all languages"
+".\n"
+"-- (1 row)\n"
+"```"
 msgstr ""
-
-msgid ""
+"```sql\n"
+"SELECT * FROM memos WHERE content %% '全文検索';\n"
+"\n"
 "--  id |                      content\n"
 "-- ----+---------------------------------------------------\n"
 "--   2 | Groongaは日本語対応の高速な全文検索エンジンです。\n"
 "-- (1 row)\n"
 "```"
-msgstr ""
 
 msgid "See [`%%` operator](../reference/operators/match.html) for more details."
 msgstr "詳細は[`%%` operator](../reference/operators/match.html)を参照してください。"
@@ -187,6 +204,15 @@ msgstr "`キーワード1 OR キーワード2`というようなクエリー構
 msgid ""
 "```sql\n"
 "SELECT * FROM memos WHERE content @@ 'PGroonga OR PostgreSQL';\n"
+"--  id |                            content                             \n"
+"-- ----+----------------------------------------------------------------\n"
+"--   3 | PGroonga is a PostgreSQL extension that uses Groonga as index.\n"
+"--   1 | PostgreSQL is a relational database management system.\n"
+"-- (2 rows)\n"
+"```"
+msgstr ""
+"```sql\n"
+"SELECT * FROM memos WHERE content @@ 'PGroonga OR PostgreSQL';\n"
 "--  id |                                  content\n"
 "-- ----+----------------------------------------------------------------------"
 "-----\n"
@@ -194,7 +220,6 @@ msgid ""
 "--   1 | PostgreSQLはリレーショナル・データベース管理システムです。\n"
 "-- (2 rows)\n"
 "```"
-msgstr ""
 
 msgid ""
 "Query syntax is similar to syntax of Web search engine. For example, you can u"
@@ -270,13 +295,22 @@ msgstr ""
 
 msgid ""
 "```sql\n"
+"INSERT INTO score_memos VALUES (1, 'PostgreSQL is a relational database manage"
+"ment system.');\n"
+"INSERT INTO score_memos VALUES (2, 'Groonga is a fast full text search engine "
+"that supports all languages.');\n"
+"INSERT INTO score_memos VALUES (3, 'PGroonga is a PostgreSQL extension that us"
+"es Groonga as index.');\n"
+"INSERT INTO score_memos VALUES (4, 'There is groonga command.');\n"
+"```"
+msgstr ""
+"```sql\n"
 "INSERT INTO score_memos VALUES (1, 'PostgreSQLはリレーショナル・データベース管理システムです。');\n"
 "INSERT INTO score_memos VALUES (2, 'Groongaは日本語対応の高速な全文検索エンジンです。');\n"
 "INSERT INTO score_memos VALUES (3, 'PGroongaはインデックスとしてGroongaを使うためのPostgreSQLの"
 "拡張機能です。');\n"
 "INSERT INTO score_memos VALUES (4, 'groongaコマンドがあります。');\n"
 "```"
-msgstr ""
 
 msgid "Perform full text search and get score."
 msgstr "全文検索を実行してスコアーを取得します。"
@@ -286,6 +320,21 @@ msgid ""
 "SELECT *, pgroonga.score(score_memos)\n"
 "  FROM score_memos\n"
 " WHERE content %% 'PGroonga' OR content %% 'PostgreSQL';\n"
+"--  id |                            content                             | scor"
+"e \n"
+"-- ----+----------------------------------------------------------------+-----"
+"--\n"
+"--   1 | PostgreSQL is a relational database management system.         |     "
+"1\n"
+"--   3 | PGroonga is a PostgreSQL extension that uses Groonga as index. |     "
+"2\n"
+"-- (2 rows)\n"
+"```"
+msgstr ""
+"```sql\n"
+"SELECT *, pgroonga.score(score_memos)\n"
+"  FROM score_memos\n"
+" WHERE content %% 'PGroonga' OR content %% 'PostgreSQL';\n"
 "--  id |                                  content                             "
 "     | score \n"
 "-- ----+----------------------------------------------------------------------"
@@ -294,7 +343,6 @@ msgid ""
 "--   3 | PGroongaはインデックスとしてGroongaを使うためのPostgreSQLの拡張機能です。 |     2\n"
 "-- (2 rows)\n"
 "```"
-msgstr ""
 
 msgid ""
 "You can sort matched records by precision ascending by using `pgroonga.score` "
@@ -307,6 +355,22 @@ msgid ""
 "  FROM score_memos\n"
 " WHERE content %% 'PGroonga' OR content %% 'PostgreSQL'\n"
 " ORDER BY pgroonga.score(score_memos) DESC;\n"
+"--  id |                            content                             | scor"
+"e \n"
+"-- ----+----------------------------------------------------------------+-----"
+"--\n"
+"--   3 | PGroonga is a PostgreSQL extension that uses Groonga as index. |     "
+"2\n"
+"--   1 | PostgreSQL is a relational database management system.         |     "
+"1\n"
+"-- (2 rows)\n"
+"```"
+msgstr ""
+"```sql\n"
+"SELECT *, pgroonga.score(score_memos)\n"
+"  FROM score_memos\n"
+" WHERE content %% 'PGroonga' OR content %% 'PostgreSQL'\n"
+" ORDER BY pgroonga.score(score_memos) DESC;\n"
 "--  id |                                  content                             "
 "     | score \n"
 "-- ----+----------------------------------------------------------------------"
@@ -315,7 +379,6 @@ msgid ""
 "--   1 | PostgreSQLはリレーショナル・データベース管理システムです。                |     1\n"
 "-- (2 rows)\n"
 "```"
-msgstr ""
 
 msgid ""
 "See [`pgroonga.score` function](../reference/functions/pgroonga-score.html) fo"
@@ -606,6 +669,24 @@ msgid ""
 "```sql\n"
 "INSERT INTO docs\n"
 "     VALUES (1,\n"
+"             ARRAY['PostgreSQL is a relational database management system.',\n"
+"                   'PostgreSQL supports full text search partially.']);\n"
+"INSERT INTO docs\n"
+"     VALUES (2,\n"
+"             ARRAY['Groonga is a fast full text search engine that supports al"
+"l languages.',\n"
+"                   'Groonga can be embedded into other systems.']);\n"
+"INSERT INTO docs\n"
+"     VALUES (3,\n"
+"             ARRAY['PGroonga is a PostgreSQL extension that uses Groonga as in"
+"dex.',\n"
+"                   'It adds powerful full text search feature to PostgreSQL.']"
+");\n"
+"```"
+msgstr ""
+"```sql\n"
+"INSERT INTO docs\n"
+"     VALUES (1,\n"
 "             ARRAY['PostgreSQLはリレーショナル・データベース管理システムです。',\n"
 "                   'PostgreSQLは部分的に全文検索をサポートしています。']);\n"
 "INSERT INTO docs\n"
@@ -617,7 +698,6 @@ msgid ""
 "             ARRAY['PGroongaはインデックスとしてGroongaを使うためのPostgreSQLの拡張機能です。',\n"
 "                   'PostgreSQLに高機能な全文検索機能を追加します。']);\n"
 "```"
-msgstr ""
 
 msgid ""
 "You can use `%%` operator or `@@` operator for full text search. The full text"
@@ -626,6 +706,21 @@ msgstr "全文検索には`%%`演算子または`@@`演算子を使えます。
 
 msgid ""
 "```sql\n"
+"SELECT * FROM docs WHERE sections %% 'text';\n"
+"--  id |                                                           sections   "
+"                                                         \n"
+"-- ----+----------------------------------------------------------------------"
+"---------------------------------------------------------\n"
+"--   1 | {\"PostgreSQL is a relational database management system.\",\"PostgreSQL"
+" supports full text search partially.\"}\n"
+"--   2 | {\"Groonga is a fast full text search engine that supports all languag"
+"es.\",\"Groonga can be embedded into other systems.\"}\n"
+"--   3 | {\"PGroonga is a PostgreSQL extension that uses Groonga as index.\",\"It"
+" adds powerful full text search feature to PostgreSQL.\"}\n"
+"-- (3 rows)\n"
+"```"
+msgstr ""
+"```sql\n"
 "SELECT * FROM docs WHERE sections %% '全文検索';\n"
 "--  id |                                                          sections    "
 "                                                      \n"
@@ -637,7 +732,6 @@ msgid ""
 "索機能を追加します。}\n"
 "-- (3 rows)\n"
 "```"
-msgstr ""
 
 msgid "### How to use PGroonga for `varchar` type of array"
 msgstr "### `varchar`型の配列に対してPGroongaを使う方法"
@@ -686,7 +780,7 @@ msgid ""
 "-- ----+------------+-----------------------------------------\n"
 "--   1 | PostgreSQL | {PostgreSQL,RDBMS}\n"
 "--   3 | PGroonga   | {PostgreSQL,Groonga,\"full-text search\"}\n"
-"-- (2 行)\n"
+"-- (2 rows)\n"
 "```"
 msgstr ""
 
@@ -1050,6 +1144,24 @@ msgid ""
 "SELECT *\n"
 "  FROM json_array_elements(pgroonga.command('select ' || pgroonga.table_name('"
 "pgroonga_content_index'))::json->1->0);\n"
+"--                                      value                                 "
+"     \n"
+"-- ---------------------------------------------------------------------------"
+"-----\n"
+"--  [4]\n"
+"--  [[\"_id\",\"UInt32\"],[\"content\",\"LongText\"],[\"ctid\",\"UInt64\"]]\n"
+"--  [1,\"PostgreSQL is a relational database management system.\",1]\n"
+"--  [2,\"Groonga is a fast full text search engine that supports all languages."
+"\",2]\n"
+"--  [3,\"PGroonga is a PostgreSQL extension that uses Groonga as index.\",3]\n"
+"--  [4,\"There is groonga command.\",4]\n"
+"-- (6 rows)\n"
+"```"
+msgstr ""
+"```sql\n"
+"SELECT *\n"
+"  FROM json_array_elements(pgroonga.command('select ' || pgroonga.table_name('"
+"pgroonga_content_index'))::json->1->0);\n"
 "--                                        value                               "
 "        \n"
 "-- ---------------------------------------------------------------------------"
@@ -1062,7 +1174,6 @@ msgid ""
 "--  [4,4,\"groongaコマンドがあります。\"]\n"
 "-- (6 rows)\n"
 "```"
-msgstr ""
 
 msgid ""
 "See [`pgroonga.table_name` function](../reference/functions/pgroonga-table-nam"

  Modified: ja/tutorial/index.md (+1 -1)
===================================================================
--- ja/tutorial/index.md    2015-10-25 21:03:53 +0900 (58a2347)
+++ ja/tutorial/index.md    2015-10-25 21:34:05 +0900 (5c5ce1b)
@@ -426,7 +426,7 @@ SELECT * FROM products WHERE tags %% 'PostgreSQL';
 -- ----+------------+-----------------------------------------
 --   1 | PostgreSQL | {PostgreSQL,RDBMS}
 --   3 | PGroonga   | {PostgreSQL,Groonga,"full-text search"}
--- (2 行)
+-- (2 rows)
 ```
 
 {: #json}

  Modified: tutorial/index.md (+48 -50)
===================================================================
--- tutorial/index.md    2015-10-25 21:03:53 +0900 (6ef30c7)
+++ tutorial/index.md    2015-10-25 21:34:05 +0900 (cd5f426)
@@ -53,10 +53,10 @@ See [CREATE INDEX USING pgroonga](../reference/create-index-using-pgroonga.html)
 Insert test data:
 
 ```sql
-INSERT INTO memos VALUES (1, 'PostgreSQLはリレーショナル・データベース管理システムです。');
-INSERT INTO memos VALUES (2, 'Groongaは日本語対応の高速な全文検索エンジンです。');
-INSERT INTO memos VALUES (3, 'PGroongaはインデックスとしてGroongaを使うためのPostgreSQLの拡張機能です。');
-INSERT INTO memos VALUES (4, 'groongaコマンドがあります。');
+INSERT INTO memos VALUES (1, 'PostgreSQL is a relational database management system.');
+INSERT INTO memos VALUES (2, 'Groonga is a fast full text search engine that supports all languages.');
+INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga as index.');
+INSERT INTO memos VALUES (4, 'There is groonga command.');
 ```
 
 Disable sequential scan to ensure using `pgroonga` index:
@@ -80,11 +80,10 @@ There are the following operators to perform full text search:
 You can use `%%` operator to perform full text search by one word:
 
 ```sql
-SELECT * FROM memos WHERE content %% '全文検索';
-
---  id |                      content
--- ----+---------------------------------------------------
---   2 | Groongaは日本語対応の高速な全文検索エンジンです。
+SELECT * FROM memos WHERE content %% 'engine';
+--  id |                                content                                 
+-- ----+------------------------------------------------------------------------
+--   2 | Groonga is a fast full text search engine that supports all languages.
 -- (1 row)
 ```
 
@@ -96,10 +95,10 @@ You can use `@@` operator to perform full text search by query syntax such as `k
 
 ```sql
 SELECT * FROM memos WHERE content @@ 'PGroonga OR PostgreSQL';
---  id |                                  content
--- ----+---------------------------------------------------------------------------
---   3 | PGroongaはインデックスとしてGroongaを使うためのPostgreSQLの拡張機能です。
---   1 | PostgreSQLはリレーショナル・データベース管理システムです。
+--  id |                            content                             
+-- ----+----------------------------------------------------------------
+--   3 | PGroonga is a PostgreSQL extension that uses Groonga as index.
+--   1 | PostgreSQL is a relational database management system.
 -- (2 rows)
 ```
 
@@ -116,11 +115,10 @@ PGroonga supports `LIKE` operator. You can perform fast full text search by PGro
 `column LIKE '%keyword%'` equals to `column %% 'keyword'`:
 
 ```sql
-SELECT * FROM memos WHERE content %% '全文検索';
-
---  id |                      content
--- ----+---------------------------------------------------
---   2 | Groongaは日本語対応の高速な全文検索エンジンです。
+SELECT * FROM memos WHERE content %% 'engine';
+--  id |                                content                                 
+-- ----+------------------------------------------------------------------------
+--   2 | Groonga is a fast full text search engine that supports all languages.
 -- (1 row)
 ```
 
@@ -150,10 +148,10 @@ CREATE INDEX pgroonga_score_memos_content_index
 Insert test data:
 
 ```sql
-INSERT INTO score_memos VALUES (1, 'PostgreSQLはリレーショナル・データベース管理システムです。');
-INSERT INTO score_memos VALUES (2, 'Groongaは日本語対応の高速な全文検索エンジンです。');
-INSERT INTO score_memos VALUES (3, 'PGroongaはインデックスとしてGroongaを使うためのPostgreSQLの拡張機能です。');
-INSERT INTO score_memos VALUES (4, 'groongaコマンドがあります。');
+INSERT INTO score_memos VALUES (1, 'PostgreSQL is a relational database management system.');
+INSERT INTO score_memos VALUES (2, 'Groonga is a fast full text search engine that supports all languages.');
+INSERT INTO score_memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga as index.');
+INSERT INTO score_memos VALUES (4, 'There is groonga command.');
 ```
 
 Disable sequential scan to ensure using `pgroonga` index:
@@ -168,10 +166,10 @@ Perform full text search and get score.
 SELECT *, pgroonga.score(score_memos)
   FROM score_memos
  WHERE content %% 'PGroonga' OR content %% 'PostgreSQL';
---  id |                                  content                                  | score 
--- ----+---------------------------------------------------------------------------+-------
---   1 | PostgreSQLはリレーショナル・データベース管理システムです。                |     1
---   3 | PGroongaはインデックスとしてGroongaを使うためのPostgreSQLの拡張機能です。 |     2
+--  id |                            content                             | score 
+-- ----+----------------------------------------------------------------+-------
+--   1 | PostgreSQL is a relational database management system.         |     1
+--   3 | PGroonga is a PostgreSQL extension that uses Groonga as index. |     2
 -- (2 rows)
 ```
 
@@ -182,10 +180,10 @@ SELECT *, pgroonga.score(score_memos)
   FROM score_memos
  WHERE content %% 'PGroonga' OR content %% 'PostgreSQL'
  ORDER BY pgroonga.score(score_memos) DESC;
---  id |                                  content                                  | score 
--- ----+---------------------------------------------------------------------------+-------
---   3 | PGroongaはインデックスとしてGroongaを使うためのPostgreSQLの拡張機能です。 |     2
---   1 | PostgreSQLはリレーショナル・データベース管理システムです。                |     1
+--  id |                            content                             | score 
+-- ----+----------------------------------------------------------------+-------
+--   3 | PGroonga is a PostgreSQL extension that uses Groonga as index. |     2
+--   1 | PostgreSQL is a relational database management system.         |     1
 -- (2 rows)
 ```
 
@@ -362,27 +360,27 @@ Insert test data:
 ```sql
 INSERT INTO docs
      VALUES (1,
-             ARRAY['PostgreSQLはリレーショナル・データベース管理システムです。',
-                   'PostgreSQLは部分的に全文検索をサポートしています。']);
+             ARRAY['PostgreSQL is a relational database management system.',
+                   'PostgreSQL supports full text search partially.']);
 INSERT INTO docs
      VALUES (2,
-             ARRAY['Groongaは日本語対応の高速な全文検索エンジンです。',
-                   'Groongaは他のシステムに組み込むことができます。']);
+             ARRAY['Groonga is a fast full text search engine that supports all languages.',
+                   'Groonga can be embedded into other systems.']);
 INSERT INTO docs
      VALUES (3,
-             ARRAY['PGroongaはインデックスとしてGroongaを使うためのPostgreSQLの拡張機能です。',
-                   'PostgreSQLに高機能な全文検索機能を追加します。']);
+             ARRAY['PGroonga is a PostgreSQL extension that uses Groonga as index.',
+                   'It adds powerful full text search feature to PostgreSQL.']);
 ```
 
 You can use `%%` operator or `@@` operator for full text search. The full text search doesn't care about the position of element.
 
 ```sql
-SELECT * FROM docs WHERE sections %% '全文検索';
---  id |                                                          sections                                                          
--- ----+----------------------------------------------------------------------------------------------------------------------------
---   1 | {PostgreSQLはリレーショナル・データベース管理システムです。,PostgreSQLは部分的に全文検索をサポートしています。}
---   2 | {Groongaは日本語対応の高速な全文検索エンジンです。,Groongaは他のシステムに組み込むことができます。}
---   3 | {PGroongaはインデックスとしてGroongaを使うためのPostgreSQLの拡張機能です。,PostgreSQLに高機能な全文検索機能を追加します。}
+SELECT * FROM docs WHERE sections %% 'text';
+--  id |                                                           sections                                                            
+-- ----+-------------------------------------------------------------------------------------------------------------------------------
+--   1 | {"PostgreSQL is a relational database management system.","PostgreSQL supports full text search partially."}
+--   2 | {"Groonga is a fast full text search engine that supports all languages.","Groonga can be embedded into other systems."}
+--   3 | {"PGroonga is a PostgreSQL extension that uses Groonga as index.","It adds powerful full text search feature to PostgreSQL."}
 -- (3 rows)
 ```
 
@@ -425,7 +423,7 @@ SELECT * FROM products WHERE tags %% 'PostgreSQL';
 -- ----+------------+-----------------------------------------
 --   1 | PostgreSQL | {PostgreSQL,RDBMS}
 --   3 | PGroonga   | {PostgreSQL,Groonga,"full-text search"}
--- (2 行)
+-- (2 rows)
 ```
 
 {: #json}
@@ -636,14 +634,14 @@ Here is an example to use `select` command with `pgroonga.table_name` function:
 ```sql
 SELECT *
   FROM json_array_elements(pgroonga.command('select ' || pgroonga.table_name('pgroonga_content_index'))::json->1->0);
---                                        value                                       
--- -----------------------------------------------------------------------------------
+--                                      value                                      
+-- --------------------------------------------------------------------------------
 --  [4]
---  [["_id","UInt32"],["_key","UInt64"],["content","LongText"]]
---  [1,1,"PostgreSQLはリレーショナル・データベース管理システムです。"]
---  [2,2,"Groongaは日本語対応の高速な全文検索エンジンです。"]
---  [3,3,"PGroongaはインデックスとしてGroongaを使うためのPostgreSQLの拡張機能です。"]
---  [4,4,"groongaコマンドがあります。"]
+--  [["_id","UInt32"],["content","LongText"],["ctid","UInt64"]]
+--  [1,"PostgreSQL is a relational database management system.",1]
+--  [2,"Groonga is a fast full text search engine that supports all languages.",2]
+--  [3,"PGroonga is a PostgreSQL extension that uses Groonga as index.",3]
+--  [4,"There is groonga command.",4]
 -- (6 rows)
 ```
 
-------------- next part --------------
HTML����������������������������...
Download 



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