[Groonga-commit] droonga/fluent-plugin-droonga at 4d2af93 [master] Add test for search query with reference column

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Nov 27 18:33:13 JST 2013


YUKI Hiroshi	2013-11-27 18:33:13 +0900 (Wed, 27 Nov 2013)

  New Revision: 4d2af93394b9c269f8b4b597c845b098645c85f3
  https://github.com/droonga/fluent-plugin-droonga/commit/4d2af93394b9c269f8b4b597c845b098645c85f3

  Message:
    Add test for search query with reference column

  Modified files:
    test/unit/plugin/handler/test_search.rb

  Modified: test/unit/plugin/handler/test_search.rb (+37 -0)
===================================================================
--- test/unit/plugin/handler/test_search.rb    2013-11-27 18:26:04 +0900 (99347b6)
+++ test/unit/plugin/handler/test_search.rb    2013-11-27 18:33:13 +0900 (c2a5e28)
@@ -235,6 +235,43 @@ class SearchHandlerTest < Test::Unit::TestCase
         assert_search(expected, request)
       end
 
+      def test_source_only_for_reference_column
+        expected = {
+          "sections-result" => {
+            "records" => [
+              {
+                "_key" => "1.1",
+                "document" => "Groonga",
+              },
+              {
+                "_key" => "1.2",
+                "document" => "Groonga",
+              },
+              {
+                "_key" => "1.3",
+                "document" => "Groonga",
+              },
+            ],
+          },
+        }
+        request = {
+          "queries" => {
+            "sections-result" => {
+              "source" => "Sections",
+              "output" => {
+                "elements" => [
+                  "records",
+                ],
+                "format" => "complex",
+                "limit" => 3,
+                "attributes" => ["_key", "document"],
+              },
+            },
+          },
+        }
+        assert_search(expected, request)
+      end
+
       def test_label
         expected = {
           "sections-result" => {
-------------- next part --------------
HTML����������������������������...
Download 



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