[Groonga-commit] groonga/groonga at c8aa0af [master] Replace deprecated option (KEY_NORMALIZE).

Back to archive index

Hiroyuki Sato null+****@clear*****
Wed Aug 19 13:24:51 JST 2015


Hiroyuki Sato	2015-08-19 13:24:51 +0900 (Wed, 19 Aug 2015)

  New Revision: c8aa0af6f61d6b2051444df811a215d9e44e34a1
  https://github.com/groonga/groonga/commit/c8aa0af6f61d6b2051444df811a215d9e44e34a1

  Merged ab26a47: Merge pull request #378 from hiroyuki-sato/fix_normalize

  Message:
    Replace deprecated option (KEY_NORMALIZE).

  Modified files:
    doc/source/tutorial/introduction.rst
    doc/source/tutorial/micro_blog.rst
    doc/source/tutorial/query_expansion.rst

  Modified: doc/source/tutorial/introduction.rst (+4 -4)
===================================================================
--- doc/source/tutorial/introduction.rst    2015-08-19 04:04:19 +0900 (68adf87)
+++ doc/source/tutorial/introduction.rst    2015-08-19 13:24:51 +0900 (556f810)
@@ -95,7 +95,7 @@ Create a table
 
 A :doc:`/reference/commands/table_create` command creates a new table.
 
-In most cases, a table has a primary key which must be specified with its data type and index type. 
+In most cases, a table has a primary key which must be specified with its data type and index type.
 
 There are various data types such as integers, strings, etc. See also :doc:`/reference/types` for more details. The index type determines the search performance and the availability of prefix searches. The details will be described later.
 
@@ -192,11 +192,11 @@ The following shows a command which creates a lexicon table named Terms. The dat
 
 .. groonga-command
 .. include:: ../example/tutorial/introduction-10.log
-.. table_create --name Terms --flags TABLE_PAT_KEY|KEY_NORMALIZE --key_type ShortText --default_tokenizer TokenBigram
+.. table_create --name Terms --flags TABLE_PAT_KEY --key_type ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto KEY_NORMALIZE
 
 The :doc:`/reference/commands/table_create` command takes many parameters but you don't need to understand all of them. Please skip the next paragraph if you are not interested in how it works.
 
-The TABLE_PAT_KEY flag specifies to store index terms in a patricia trie. The KEY_NORMALIZE flag specifies to normalize index terms. In this example, both flags are validated by using a '|'. The `default_tokenizer` parameter specifies the method for tokenizing text. This example uses TokenBigram that is generally called N-gram.
+The TABLE_PAT_KEY flag specifies to store index terms in a patricia trie. The `default_tokenizer` parameter specifies the method for tokenizing text. This example uses TokenBigram that is generally called N-gram. The `normalizer` parameter specifies to normalize index terms.
 
 Create an index column for full text search
 -------------------------------------------
@@ -220,7 +220,7 @@ Full text search
 
 It's time. You can make full text search with a :doc:`/reference/commands/select` command.
 
-A query for full text search is specified with a `query` parameter. The following example searches records whose "title" column contains "this". The '@' specifies to make full text search. Note that a lower case query matches upper case and capitalized terms in a record if KEY_NORMALIZE was specified when creating a lexcon table.
+A query for full text search is specified with a `query` parameter. The following example searches records whose "title" column contains "this". The '@' specifies to make full text search. Note that a lower case query matches upper case and capitalized terms in a record if NormalizerAuto was specified when creating a lexcon table.
 
 .. groonga-command
 .. include:: ../example/tutorial/introduction-12.log

  Modified: doc/source/tutorial/micro_blog.rst (+9 -9)
===================================================================
--- doc/source/tutorial/micro_blog.rst    2015-08-19 04:04:19 +0900 (c3c4efa)
+++ doc/source/tutorial/micro_blog.rst    2015-08-19 13:24:51 +0900 (79517c8)
@@ -21,7 +21,7 @@ Let's create table.
  table_create --name Users --flags TABLE_HASH_KEY --key_type ShortText
  table_create --name Comments --flags TABLE_HASH_KEY --key_type ShortText
  table_create --name HashTags --flags TABLE_HASH_KEY --key_type ShortText
- table_create --name Bigram --flags TABLE_PAT_KEY|KEY_NORMALIZE --key_type ShortText --default_tokenizer TokenBigram
+ table_create --name Bigram --flags TABLE_PAT_KEY --key_type ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto
  table_create --name GeoIndex --flags TABLE_PAT_KEY --key_type WGS84GeoPoint
 
  column_create --table Users --name name --flags COLUMN_SCALAR --type ShortText
@@ -270,9 +270,9 @@ when data is loaded.
  table_create --name Users --flags TABLE_HASH_KEY --key_type ShortText
  table_create --name Comments --flags TABLE_HASH_KEY --key_type ShortText
  table_create --name HashTags --flags TABLE_HASH_KEY --key_type ShortText
- table_create --name Bigram --flags TABLE_PAT_KEY|KEY_NORMALIZE --key_type ShortText --default_tokenizer TokenBigram
+ table_create --name Bigram --flags TABLE_PAT_KEY --key_type ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto
  table_create --name GeoIndex --flags TABLE_PAT_KEY --key_type WGS84GeoPoint
- 
+
  column_create --table Users --name name --flags COLUMN_SCALAR --type ShortText
  column_create --table Users --name follower --flags COLUMN_VECTOR --type Users
  column_create --table Users --name favorites --flags COLUMN_VECTOR --type Comments
@@ -280,7 +280,7 @@ when data is loaded.
  column_create --table Users --name location_str --flags COLUMN_SCALAR --type ShortText
  column_create --table Users --name description --flags COLUMN_SCALAR --type ShortText
  column_create --table Users --name followee --flags COLUMN_INDEX --type Users --source follower
- 
+
  column_create --table Comments --name comment --flags COLUMN_SCALAR --type ShortText
  column_create --table Comments --name last_modified --flags COLUMN_SCALAR --type Time
  column_create --table Comments --name replied_to --flags COLUMN_SCALAR --type Comments
@@ -289,15 +289,15 @@ when data is loaded.
  column_create --table Comments --name location --flags COLUMN_SCALAR --type WGS84GeoPoint
  column_create --table Comments --name posted_by --flags COLUMN_SCALAR --type Users
  column_create --table Comments --name favorited_by --flags COLUMN_INDEX --type Users --source favorites
- 
+
  column_create --table HashTags --name hash_index --flags COLUMN_INDEX --type Comments --source hash_tags
- 
+
  column_create --table Bigram --name users_index --flags COLUMN_INDEX|WITH_POSITION|WITH_SECTION --type Users --source name,location_str,description
  column_create --table Bigram --name comment_index --flags COLUMN_INDEX|WITH_POSITION --type Comments --source comment
- 
+
  column_create --table GeoIndex --name users_location --type Users --flags COLUMN_INDEX --source location
  column_create --table GeoIndex --name comments_location --type Comments --flags COLUMN_INDEX --source location
- 
+
  load --table Users
  [
    {
@@ -328,7 +328,7 @@ when data is loaded.
      "description": "Hmm,Hmm"
    }
  ]
- 
+
  load --table Comments
  [
    {

  Modified: doc/source/tutorial/query_expansion.rst (+1 -1)
===================================================================
--- doc/source/tutorial/query_expansion.rst    2015-08-19 04:04:19 +0900 (5e9c933)
+++ doc/source/tutorial/query_expansion.rst    2015-08-19 13:24:51 +0900 (927b574)
@@ -29,7 +29,7 @@ Let's create document table and synonym table.
 .. include:: ../example/tutorial/query_expansion-1.log
 .. table_create Doc TABLE_PAT_KEY ShortText
 .. column_create Doc body COLUMN_SCALAR ShortText
-.. table_create Term TABLE_PAT_KEY|KEY_NORMALIZE ShortText --default_tokenizer TokenBigram
+.. table_create Term TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto
 .. column_create Term Doc_body COLUMN_INDEX|WITH_POSITION Doc body
 .. table_create Synonym TABLE_PAT_KEY ShortText
 .. column_create Synonym body COLUMN_SCALAR ShortText
-------------- next part --------------
HTML����������������������������...
Download 



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