[Groonga-commit] droonga/droonga-engine at 7950a8c [master] test dump: add a test for index column

Back to archive index

Kouhei Sutou null+****@clear*****
Mon May 19 15:06:14 JST 2014


Kouhei Sutou	2014-05-19 15:06:14 +0900 (Mon, 19 May 2014)

  New Revision: 7950a8c5d1b6f607553ebd9591ab4af500db11ab
  https://github.com/droonga/droonga-engine/commit/7950a8c5d1b6f607553ebd9591ab4af500db11ab

  Message:
    test dump: add a test for index column

  Added files:
    test/command/suite/dump/column/index.catalog.json
    test/command/suite/dump/column/index.expected
    test/command/suite/dump/column/index.test

  Added: test/command/suite/dump/column/index.catalog.json (+40 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/dump/column/index.catalog.json    2014-05-19 15:06:14 +0900 (23ff611)
@@ -0,0 +1,40 @@
+{
+  "datasets": {
+    "Droonga": {
+      "schema": {
+        "Memos": {
+          "type": "Hash",
+          "keyType": "ShortText",
+          "columns": {
+            "content": {
+              "type": "Scalar",
+              "valueType": "ShortText"
+            }
+          }
+        },
+        "Terms": {
+          "type": "PatriciaTrie",
+          "keyType": "ShortText",
+          "tokenizer": "TokenBigram",
+          "normalizer": "NormalizerAuto",
+          "columns": {
+            "index": {
+              "type": "Index",
+              "valueType": "Memos",
+              "indexOptions": {
+                "section": true,
+                "weight": true,
+                "position": true,
+                "sources": [
+                  "_key",
+                  "content"
+                ]
+              }
+            }
+          }
+        }
+      },
+      "fact": "Memos"
+    }
+  }
+}

  Added: test/command/suite/dump/column/index.expected (+195 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/dump/column/index.expected    2014-05-19 15:06:14 +0900 (0036925)
@@ -0,0 +1,195 @@
+{
+  "inReplyTo": "request-id",
+  "dataset": "Droonga",
+  "type": "dump.start"
+}
+{
+  "inReplyTo": "request-id",
+  "dataset": "Droonga",
+  "type": "dump.start"
+}
+{
+  "inReplyTo": "request-id",
+  "dataset": "Droonga",
+  "type": "dump.start"
+}
+{
+  "inReplyTo": "request-id",
+  "statusCode": 200,
+  "type": "dump.result",
+  "body": true
+}
+{
+  "inReplyTo": "request-id",
+  "dataset": "Droonga",
+  "body": {
+    "type": "Hash",
+    "name": "Memos",
+    "keyType": "ShortText"
+  },
+  "type": "dump.table"
+}
+{
+  "inReplyTo": "request-id",
+  "dataset": "Droonga",
+  "body": {
+    "table": "Memos",
+    "name": "content",
+    "type": "Scalar",
+    "valueType": "ShortText"
+  },
+  "type": "dump.column"
+}
+{
+  "inReplyTo": "request-id",
+  "dataset": "Droonga",
+  "body": {
+    "type": "PatriciaTrie",
+    "name": "Terms",
+    "keyType": "ShortText",
+    "tokenizer": "TokenBigram",
+    "normalizer": "NormalizerAuto"
+  },
+  "type": "dump.table"
+}
+{
+  "inReplyTo": "request-id",
+  "dataset": "Droonga",
+  "body": {
+    "table": "Terms",
+    "name": "Memos__key_content",
+    "type": "Index",
+    "valueType": "Memos",
+    "indexOptions": {
+      "section": true,
+      "weight": true,
+      "position": true,
+      "sources": [
+        "_key",
+        "content"
+      ]
+    }
+  },
+  "type": "dump.column"
+}
+{
+  "inReplyTo": "request-id",
+  "dataset": "Droonga",
+  "type": "dump.end"
+}
+{
+  "inReplyTo": "request-id",
+  "dataset": "Droonga",
+  "body": {
+    "type": "Hash",
+    "name": "Memos",
+    "keyType": "ShortText"
+  },
+  "type": "dump.table"
+}
+{
+  "inReplyTo": "request-id",
+  "dataset": "Droonga",
+  "body": {
+    "table": "Memos",
+    "name": "content",
+    "type": "Scalar",
+    "valueType": "ShortText"
+  },
+  "type": "dump.column"
+}
+{
+  "inReplyTo": "request-id",
+  "dataset": "Droonga",
+  "body": {
+    "type": "PatriciaTrie",
+    "name": "Terms",
+    "keyType": "ShortText",
+    "tokenizer": "TokenBigram",
+    "normalizer": "NormalizerAuto"
+  },
+  "type": "dump.table"
+}
+{
+  "inReplyTo": "request-id",
+  "dataset": "Droonga",
+  "body": {
+    "table": "Terms",
+    "name": "Memos__key_content",
+    "type": "Index",
+    "valueType": "Memos",
+    "indexOptions": {
+      "section": true,
+      "weight": true,
+      "position": true,
+      "sources": [
+        "_key",
+        "content"
+      ]
+    }
+  },
+  "type": "dump.column"
+}
+{
+  "inReplyTo": "request-id",
+  "dataset": "Droonga",
+  "type": "dump.end"
+}
+{
+  "inReplyTo": "request-id",
+  "dataset": "Droonga",
+  "body": {
+    "type": "Hash",
+    "name": "Memos",
+    "keyType": "ShortText"
+  },
+  "type": "dump.table"
+}
+{
+  "inReplyTo": "request-id",
+  "dataset": "Droonga",
+  "body": {
+    "table": "Memos",
+    "name": "content",
+    "type": "Scalar",
+    "valueType": "ShortText"
+  },
+  "type": "dump.column"
+}
+{
+  "inReplyTo": "request-id",
+  "dataset": "Droonga",
+  "body": {
+    "type": "PatriciaTrie",
+    "name": "Terms",
+    "keyType": "ShortText",
+    "tokenizer": "TokenBigram",
+    "normalizer": "NormalizerAuto"
+  },
+  "type": "dump.table"
+}
+{
+  "inReplyTo": "request-id",
+  "dataset": "Droonga",
+  "body": {
+    "table": "Terms",
+    "name": "Memos__key_content",
+    "type": "Index",
+    "valueType": "Memos",
+    "indexOptions": {
+      "section": true,
+      "weight": true,
+      "position": true,
+      "sources": [
+        "_key",
+        "content"
+      ]
+    }
+  },
+  "type": "dump.column"
+}
+{
+  "inReplyTo": "request-id",
+  "dataset": "Droonga",
+  "type": "dump.end"
+}

  Added: test/command/suite/dump/column/index.test (+5 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/dump/column/index.test    2014-05-19 15:06:14 +0900 (6f787ba)
@@ -0,0 +1,5 @@
+#@require-catalog-version 2
+{
+  "type": "dump",
+  "dataset": "Droonga"
+}
-------------- next part --------------
HTML����������������������������...
Télécharger 



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