[Groonga-commit] droonga/droonga-engine at 71ca85d [master] test add: add a test for adding non-weight vector value

Back to archive index

Kouhei Sutou null+****@clear*****
Mon May 19 14:41:34 JST 2014


Kouhei Sutou	2014-05-19 14:41:34 +0900 (Mon, 19 May 2014)

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

  Message:
    test add: add a test for adding non-weight vector value

  Added files:
    test/command/suite/add/vector/short_text.catalog.json
    test/command/suite/add/vector/short_text.expected
    test/command/suite/add/vector/short_text.test

  Added: test/command/suite/add/vector/short_text.catalog.json (+26 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/add/vector/short_text.catalog.json    2014-05-19 14:41:34 +0900 (f5f9e20)
@@ -0,0 +1,26 @@
+{
+  "datasets": {
+    "Droonga": {
+      "schema": {
+        "Memos": {
+          "type": "Hash",
+          "keyType": "ShortText",
+          "columns": {
+            "content": {
+              "type": "Scalar",
+              "valueType": "Text"
+            },
+            "categories": {
+              "type": "Vector",
+              "valueType": "ShortText",
+              "vectorOptions": {
+                "weight": false
+              }
+            }
+          }
+        }
+      },
+      "fact": "Memos"
+    }
+  }
+}

  Added: test/command/suite/add/vector/short_text.expected (+25 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/add/vector/short_text.expected    2014-05-19 14:41:34 +0900 (90932b9)
@@ -0,0 +1,25 @@
+{
+  "inReplyTo": "request-id",
+  "statusCode": 200,
+  "type": "add.result",
+  "body": true
+}
+{
+  "inReplyTo": "request-id",
+  "statusCode": 200,
+  "type": "search.result",
+  "body": {
+    "documents": {
+      "records": [
+        [
+          "Groonga newbie",
+          "Groonga is a full text search engine",
+          [
+            "Groonga",
+            "full text search"
+          ]
+        ]
+      ]
+    }
+  }
+}

  Added: test/command/suite/add/vector/short_text.test (+35 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/add/vector/short_text.test    2014-05-19 14:41:34 +0900 (c92ffa1)
@@ -0,0 +1,35 @@
+#@require-catalog-version 2
+{
+  "dataset": "Droonga",
+  "type": "add",
+  "body": {
+    "table": "Memos",
+    "key": "Groonga newbie",
+    "values": {
+      "content": "Groonga is a full text search engine",
+      "categories": [
+        "Groonga",
+        "full text search"
+      ]
+    }
+  }
+}
+{
+  "type": "search",
+  "dataset": "Droonga",
+  "body": {
+    "queries": {
+      "documents": {
+        "source": "Memos",
+        "output": {
+          "elements": [
+            "attributes",
+            "records"
+          ],
+          "limit": -1,
+          "attributes": ["_key", "content", "categories"]
+        }
+      }
+    }
+  }
+}
-------------- next part --------------
HTML����������������������������...
Descargar 



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