[Groonga-commit] droonga/droonga-engine at d76883a [master] test: add reference vector case

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Jul 15 23:15:16 JST 2014


Kouhei Sutou	2014-07-15 23:15:16 +0900 (Tue, 15 Jul 2014)

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

  Message:
    test: add reference vector case

  Added files:
    test/command/suite/search/output/attributes/reference_vector.catalog.json
    test/command/suite/search/output/attributes/reference_vector.expected
    test/command/suite/search/output/attributes/reference_vector.test

  Added: test/command/suite/search/output/attributes/reference_vector.catalog.json (+27 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/search/output/attributes/reference_vector.catalog.json    2014-07-15 23:15:16 +0900 (9ada1f7)
@@ -0,0 +1,27 @@
+{
+  "datasets": {
+    "Default": {
+      "fact": "Memos",
+      "schema": {
+        "Tags": {
+          "type": "PatriciaTrie",
+          "keyType": "ShortText"
+        },
+        "Memos": {
+          "type": "Hash",
+          "keyType": "ShortText",
+          "columns": {
+            "content": {
+              "type": "Scalar",
+              "valueType": "Text"
+            },
+            "tags": {
+              "type": "Vector",
+              "valueType": "Tags"
+            }
+          }
+        }
+      }
+    }
+  }
+}

  Added: test/command/suite/search/output/attributes/reference_vector.expected (+30 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/search/output/attributes/reference_vector.expected    2014-07-15 23:15:16 +0900 (94c7f56)
@@ -0,0 +1,30 @@
+{
+  "inReplyTo": "request-id",
+  "statusCode": 200,
+  "type": "search.result",
+  "body": {
+    "memos": {
+      "attributes": [
+        {
+          "name": "_key",
+          "type": "ShortText",
+          "vector": false
+        },
+        {
+          "name": "tags",
+          "type": "Tags",
+          "vector": true
+        }
+      ],
+      "records": [
+        [
+          "Droonga is fun",
+          [
+            "Droonga",
+            "Fun"
+          ]
+        ]
+      ]
+    }
+  }
+}

  Added: test/command/suite/search/output/attributes/reference_vector.test (+32 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/search/output/attributes/reference_vector.test    2014-07-15 23:15:16 +0900 (1d63a55)
@@ -0,0 +1,32 @@
+# -*- js -*-
+#@require-catalog-version 2
+#@disable-logging
+{
+  "type": "add",
+  "dataset": "Default",
+  "body": {
+    "table": "Memos",
+    "key": "Droonga is fun",
+    "values": {
+      "content": "I started Droonga. It is very fun!",
+      "tags": ["Droonga", "Fun"]
+    }
+  }
+}
+#@enable-logging
+{
+  "type": "search",
+  "dataset": "Default",
+  "body": {
+    "queries": {
+      "memos": {
+        "source": "Memos",
+        "output": {
+          "elements": ["attributes", "records"],
+          "attributes": ["_key", "tags"],
+          "limit": 10
+        }
+      }
+    }
+  }
+}
-------------- next part --------------
HTML����������������������������...
Download 



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