[Groonga-commit] groonga/groonga [master] use TokenBigramSplitSymbol. #225

Back to archive index

null+****@clear***** null+****@clear*****
2010年 9月 13日 (月) 17:43:59 JST


Kouhei Sutou	2010-09-13 08:43:59 +0000 (Mon, 13 Sep 2010)

  New Revision: 9d49683c1a83b47f7f894a3ad3fbe19463fe2929

  Log:
    use TokenBigramSplitSymbol. #225

  Modified files:
    test/unit/core/test-table-select-normalize.c

  Modified: test/unit/core/test-table-select-normalize.c (+15 -3)
===================================================================
--- test/unit/core/test-table-select-normalize.c    2010-09-13 06:07:10 +0000 (ee24606)
+++ test/unit/core/test-table-select-normalize.c    2010-09-13 08:43:59 +0000 (09e80d3)
@@ -73,8 +73,9 @@ setup_ddl(void)
   assert_send_command("table_create Terms "
                       "--flags TABLE_PAT_KEY|KEY_NORMALIZE "
                       "--key_type ShortText "
-                      "--default_tokenizer TokenBigram");
-  assert_send_command("column_create Terms comment_content COLUMN_INDEX "
+                      "--default_tokenizer TokenBigramSplitSymbol");
+  assert_send_command("column_create Terms comment_content "
+                      "COLUMN_INDEX|WITH_POSITION "
                       "Comments "
                       "--source content");
 }
@@ -180,7 +181,6 @@ query(const gchar *string)
 void
 test_japanese_parenthesis(void)
 {
-  cut_omit("token->uni_symbol should be customzable");
   cut_assert_not_null(grn_table_select(context, comments,
                                        query("content:@)は"),
                                        result, GRN_OP_OR));
@@ -213,3 +213,15 @@ test_bigram_end_with_space_and_single_char(void)
                          result,
                          "_key");
 }
+
+void
+test_bigram_pharase(void)
+{
+  cut_assert_not_null(grn_table_select(context, comments,
+                                       query("content:@ロボット"),
+                                       result, GRN_OP_OR));
+  grn_test_assert_select(context,
+                         gcut_take_new_list_string("ロボ", NULL),
+                         result,
+                         "_key");
+}




Groonga-commit メーリングリストの案内
Back to archive index