[Groonga-commit] groonga/groonga [master] Add a test for offline index construction of multi column index

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Nov 14 17:30:51 JST 2012


Kouhei Sutou	2012-11-14 17:30:51 +0900 (Wed, 14 Nov 2012)

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

  Log:
    Add a test for offline index construction of multi column index

  Added files:
    test/command/suite/load/index/offline/multi_column.expected
    test/command/suite/load/index/offline/multi_column.test

  Added: test/command/suite/load/index/offline/multi_column.expected (+68 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/load/index/offline/multi_column.expected    2012-11-14 17:30:51 +0900 (e51f28f)
@@ -0,0 +1,68 @@
+table_create Users TABLE_NO_KEY
+[[0,0.0,0.0],true]
+column_create Users name COLUMN_SCALAR ShortText
+[[0,0.0,0.0],true]
+column_create Users address COLUMN_SCALAR ShortText
+[[0,0.0,0.0],true]
+load --table Users
+[
+["name", "address"],
+["Alice", "France"],
+["Bob", "England"]
+]
+[[0,0.0,0.0],2]
+table_create Words TABLE_PAT_KEY|KEY_NORMALIZE --key_type ShortText   --default_tokenizer TokenBigramSplitSymbolAlpha
+[[0,0.0,0.0],true]
+column_create Words users_all COLUMN_INDEX|WITH_POSITION|WITH_SECTION   Users name,address
+[[0,0.0,0.0],true]
+select Words --output_columns _key
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        18
+      ],
+      [
+        [
+          "_key",
+          "ShortText"
+        ]
+      ],
+      [
+        "al"
+      ],
+      [
+        "an"
+      ],
+      [
+        "b"
+      ],
+      [
+        "bo"
+      ],
+      [
+        "ce"
+      ],
+      [
+        "d"
+      ],
+      [
+        "e"
+      ],
+      [
+        "en"
+      ],
+      [
+        "fr"
+      ],
+      [
+        "gl"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/load/index/offline/multi_column.test (+17 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/load/index/offline/multi_column.test    2012-11-14 17:30:51 +0900 (57afd06)
@@ -0,0 +1,17 @@
+table_create Users TABLE_NO_KEY
+column_create Users name COLUMN_SCALAR ShortText
+column_create Users address COLUMN_SCALAR ShortText
+
+load --table Users
+[
+["name", "address"],
+["Alice", "France"],
+["Bob", "England"]
+]
+
+table_create Words TABLE_PAT_KEY|KEY_NORMALIZE --key_type ShortText \
+  --default_tokenizer TokenBigramSplitSymbolAlpha
+column_create Words users_all COLUMN_INDEX|WITH_POSITION|WITH_SECTION \
+  Users name,address
+
+select Words --output_columns _key
-------------- next part --------------
HTML����������������������������...
Download 



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