[Groonga-commit] groonga/groonga at 1fcc4a1 [master] doc en: update document about creating column index

Back to archive index

HAYASHI Kentaro null+****@clear*****
Fri Jul 11 18:28:46 JST 2014


HAYASHI Kentaro	2014-07-11 18:28:46 +0900 (Fri, 11 Jul 2014)

  New Revision: 1fcc4a1d4176b13e40706f8fe655ee84ab48031b
  https://github.com/groonga/groonga/commit/1fcc4a1d4176b13e40706f8fe655ee84ab48031b

  Message:
    doc en: update document about creating column index

  Modified files:
    doc/source/tutorial/match_columns.rst

  Modified: doc/source/tutorial/match_columns.rst (+15 -11)
===================================================================
--- doc/source/tutorial/match_columns.rst    2014-07-11 17:52:53 +0900 (31930ee)
+++ doc/source/tutorial/match_columns.rst    2014-07-11 18:28:46 +0900 (189c780)
@@ -5,21 +5,24 @@
 .. groonga-command
 .. database: tutorial-match-columns
 
-match_columnsパラメータ
+match_columns parameter
 =======================
 
-複数のカラムを対象とした全文検索
---------------------------------
+Full-text search against multiple columns
+-----------------------------------------
+
+Groonga supports full-text search against multiple columns. Let's consider blog site. Usually, blog site has a table which contains title column and content column. How do you search the blog entry which contains specified keywords in title or content?
+
+In such a case, there are two ways to create indexes. One way is creating column index against each column. The other way is creating one column index against multiple columns. Either way, Groonga supports similar full-text search syntax.
 
-Groongaでは、複数のカラムを対象とした全文検索を行うことができます。例えば、ブログのテーブルで、タイトルと内容とがそれぞれ別のカラムに入ったものがあるとしましょう。「タイトルもしくは内容に特定の単語を含む」検索を行いたいとします。
+Creating column index against each column
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-この場合、2つのインデックス作成方式があります。1つは、それぞれのカラムに1つずつインデックスを付与する方式です。もう1つは、複数のカラムに対して1つのインデックスを付与する方式です。Groongaでは、どちらの形式のインデックスが存在している場合でも、同一の記法で全文検索を行うことができます。
+Here is the example which create column index against each column.
 
-カラムごとにインデックスを付与する場合
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+First, create ``Blog1`` table, add ``title`` column which stores title string, ``message`` column which stores content of blog entry.
 
-Blog1テーブルを作り、タイトル文字列のtitleカラム、本文のmessageカラムを追加しています。
-インデックス用のIndexBlog1テーブルも作り、titleカラムのインデックス用にindex_titleカラム、messageカラムのインデック用にindex_messageカラムと、それぞれ1カラムごとに1つずつ追加しています。
+Then create ``IndexBlog1`` table for column indexes, add ``index_title`` column for ``title`` column, ``index_message`` column for ``message`` column.
 
 .. groonga-command
 .. include:: ../example/tutorial/match_columns-1.log
@@ -36,9 +39,10 @@ Blog1テーブルを作り、タイトル文字列のtitleカラム、本文のm
 .. {"_key":"grn3","title":"groonga message","message":"none"}
 .. ]
 
-match_columnsオプションで、検索対象のカラムを複数指定することが出来ます。検索する文字列はqueryオプションで指定します。これを使うことで、タイトルと本文を全文検索することができます。
+``match_columns`` option of ``select`` command accepts multiple columns as search target.
+Specify query string to ``query`` option. Then you can do full-text search title and content of blog entries.
 
-実際に検索してみましょう。
+Let's try to search blog entries.
 
 .. groonga-command
 .. include:: ../example/tutorial/match_columns-2.log
-------------- next part --------------
HTML����������������������������...
下載 



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