[Groonga-commit] droonga/fluent-plugin-droonga at 37a3b1e [master] Add test for chained queries and condition (query syntax)

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Nov 28 20:27:08 JST 2013


YUKI Hiroshi	2013-11-28 20:27:08 +0900 (Thu, 28 Nov 2013)

  New Revision: 37a3b1e2aa952228e199ab8b2a4a4136aa65647f
  https://github.com/droonga/fluent-plugin-droonga/commit/37a3b1e2aa952228e199ab8b2a4a4136aa65647f

  Message:
    Add test for chained queries and condition (query syntax)

  Added files:
    test/command/suite/search/chained-queries.expected
    test/command/suite/search/chained-queries.test
    test/command/suite/search/condition-query.expected
    test/command/suite/search/condition-query.test

  Added: test/command/suite/search/chained-queries.expected (+45 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/search/chained-queries.expected    2013-11-28 20:27:08 +0900 (c174a7f)
@@ -0,0 +1,45 @@
+[
+  "droonga.message",
+  0,
+  {
+    "inReplyTo": null,
+    "statusCode": 200,
+    "type": "search.result",
+    "body": {
+      "Groonga": {
+        "count": 4,
+        "records": [
+          [
+            "Groonga overview"
+          ],
+          [
+            "Groonga library"
+          ],
+          [
+            "Groonga server"
+          ],
+          [
+            "Groonga storage engine"
+          ]
+        ]
+      },
+      "keys": {
+        "count": 4,
+        "records": [
+          [
+            "1.9"
+          ],
+          [
+            "1.8"
+          ],
+          [
+            "1.7"
+          ],
+          [
+            "1.1"
+          ]
+        ]
+      }
+    }
+  }
+]

  Added: test/command/suite/search/chained-queries.test (+43 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/search/chained-queries.test    2013-11-28 20:27:08 +0900 (b2089a0)
@@ -0,0 +1,43 @@
+#@include fixture/documents.jsons
+{
+  "type": "search",
+  "dataset": "Droonga",
+  "body": {
+    "queries": {
+      "Groonga": {
+        "source": "Sections",
+        "condition": {
+          "query": "groonga",
+          "matchTo": ["title"]
+        },
+        "sortBy": ["_key"],
+        "output": {
+          "elements": [
+            "startTime",
+            "elapsedTime",
+            "count",
+            "attributes",
+            "records"
+          ],
+          "limit": -1,
+          "attributes": ["title"]
+        }
+      },
+      "keys": {
+        "source": "Groonga",
+        "sortBy": ["-_key"],
+        "output": {
+          "elements": [
+            "startTime",
+            "elapsedTime",
+            "count",
+            "attributes",
+            "records"
+          ],
+          "limit": -1,
+          "attributes": ["_key"]
+        }
+      }
+    }
+  }
+}

  Added: test/command/suite/search/condition-query.expected (+28 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/search/condition-query.expected    2013-11-28 20:27:08 +0900 (8664931)
@@ -0,0 +1,28 @@
+[
+  "droonga.message",
+  0,
+  {
+    "inReplyTo": null,
+    "statusCode": 200,
+    "type": "search.result",
+    "body": {
+      "result": {
+        "count": 4,
+        "records": [
+          [
+            "Groonga overview"
+          ],
+          [
+            "Groonga library"
+          ],
+          [
+            "Groonga server"
+          ],
+          [
+            "Groonga storage engine"
+          ]
+        ]
+      }
+    }
+  }
+]

  Added: test/command/suite/search/condition-query.test (+28 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/search/condition-query.test    2013-11-28 20:27:08 +0900 (d406574)
@@ -0,0 +1,28 @@
+#@include fixture/documents.jsons
+{
+  "type": "search",
+  "dataset": "Droonga",
+  "body": {
+    "queries": {
+      "result": {
+        "source": "Sections",
+        "condition": {
+          "query": "groonga",
+          "matchTo": ["title"]
+        },
+        "sortBy": ["_key"],
+        "output": {
+          "elements": [
+            "startTime",
+            "elapsedTime",
+            "count",
+            "attributes",
+            "records"
+          ],
+          "limit": -1,
+          "attributes": ["title"]
+        }
+      }
+    }
+  }
+}
-------------- next part --------------
HTML����������������������������...
Download 



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