[Groonga-commit] groonga/groonga at 0cbc87e [master] test: fix wrong complete implementation

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Nov 19 11:33:16 JST 2015


Kouhei Sutou	2015-11-19 11:33:16 +0900 (Thu, 19 Nov 2015)

  New Revision: 0cbc87ee209fe4fef5e9a951b20489e04d1e9661
  https://github.com/groonga/groonga/commit/0cbc87ee209fe4fef5e9a951b20489e04d1e9661

  Message:
    test: fix wrong complete implementation

  Modified files:
    test/command/suite/select/function/sub_filter/complete/rk_or_prefix.expected
    test/command/suite/select/function/sub_filter/complete/rk_or_prefix.test

  Modified: test/command/suite/select/function/sub_filter/complete/rk_or_prefix.expected (+11 -5)
===================================================================
--- test/command/suite/select/function/sub_filter/complete/rk_or_prefix.expected    2015-11-19 11:16:21 +0900 (1c8a293)
+++ test/command/suite/select/function/sub_filter/complete/rk_or_prefix.expected    2015-11-19 11:33:16 +0900 (b7736cd)
@@ -1,6 +1,8 @@
 table_create Readings TABLE_PAT_KEY ShortText --normalizer NormalizerAuto
 [[0,0.0,0.0],true]
-table_create Items TABLE_HASH_KEY ShortText
+table_create Items TABLE_PAT_KEY ShortText --normalizer NormalizerAuto
+[[0,0.0,0.0],true]
+column_create Items label COLUMN_SCALAR ShortText
 [[0,0.0,0.0],true]
 column_create Items readings COLUMN_VECTOR Readings
 [[0,0.0,0.0],true]
@@ -8,10 +10,10 @@ column_create Readings items_index COLUMN_INDEX Items readings
 [[0,0.0,0.0],true]
 load --table Items
 [
-{"_key": "Groonga", "readings": ["グルンガ", "Groonga"]}
+{"_key": "groonga", "label": "Groonga", "readings": ["グルンガ"]}
 ]
 [[0,0.0,0.0],1]
-select Items   --filter 'sub_filter(readings,                        "prefix_rk_search(_key, \\"gro\\") ||                           _key @^ \\"gro\\"")'
+select Items   --filter 'sub_filter(readings, "prefix_rk_search(_key, \\"gro\\")") ||             _key @^ "Gro"'
 [
   [
     0,
@@ -33,16 +35,20 @@ select Items   --filter 'sub_filter(readings,                        "prefix_rk_
           "ShortText"
         ],
         [
+          "label",
+          "ShortText"
+        ],
+        [
           "readings",
           "Readings"
         ]
       ],
       [
         1,
+        "groonga",
         "Groonga",
         [
-          "グルンガ",
-          "groonga"
+          "グルンガ"
         ]
       ]
     ]

  Modified: test/command/suite/select/function/sub_filter/complete/rk_or_prefix.test (+5 -5)
===================================================================
--- test/command/suite/select/function/sub_filter/complete/rk_or_prefix.test    2015-11-19 11:16:21 +0900 (2ac8989)
+++ test/command/suite/select/function/sub_filter/complete/rk_or_prefix.test    2015-11-19 11:33:16 +0900 (85c3e1a)
@@ -1,16 +1,16 @@
 table_create Readings TABLE_PAT_KEY ShortText --normalizer NormalizerAuto
 
-table_create Items TABLE_HASH_KEY ShortText
+table_create Items TABLE_PAT_KEY ShortText --normalizer NormalizerAuto
+column_create Items label COLUMN_SCALAR ShortText
 column_create Items readings COLUMN_VECTOR Readings
 
 column_create Readings items_index COLUMN_INDEX Items readings
 
 load --table Items
 [
-{"_key": "Groonga", "readings": ["グルンガ", "Groonga"]}
+{"_key": "groonga", "label": "Groonga", "readings": ["グルンガ"]}
 ]
 
 select Items \
-  --filter 'sub_filter(readings, \
-                       "prefix_rk_search(_key, \\"gro\\") || \
-                          _key @^ \\"gro\\"")'
+  --filter 'sub_filter(readings, "prefix_rk_search(_key, \\"gro\\")") || \
+            _key @^ "Gro"'
-------------- next part --------------
HTML����������������������������...
下載 



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