[Groonga-commit] groonga/groonga at e3b51cb [master] test adjuster: add no factor case

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Feb 20 15:15:29 JST 2014


Kouhei Sutou	2014-02-20 15:15:29 +0900 (Thu, 20 Feb 2014)

  New Revision: e3b51cbe140ca53c7dd484ae2e1a39103ad9dc3a
  https://github.com/groonga/groonga/commit/e3b51cbe140ca53c7dd484ae2e1a39103ad9dc3a

  Message:
    test adjuster: add no factor case

  Added files:
    test/command/suite/select/adjuster/no_factor.expected
    test/command/suite/select/adjuster/no_factor.test

  Added: test/command/suite/select/adjuster/no_factor.expected (+66 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/adjuster/no_factor.expected    2014-02-20 15:15:29 +0900 (59c0f73)
@@ -0,0 +1,66 @@
+table_create Tags TABLE_PAT_KEY ShortText
+[[0,0.0,0.0],true]
+table_create Memos TABLE_HASH_KEY ShortText
+[[0,0.0,0.0],true]
+column_create Memos tags COLUMN_INDEX|WITH_WEIGHT Tags
+[[0,0.0,0.0],true]
+load --table Memos
+[
+{
+  "_key": "Groonga is fast",
+  "tags": {
+    "groonga": 100
+  }
+},
+{
+  "_key": "Mroonga is also fast",
+  "tags": {
+    "mroonga": 100,
+    "groonga": 10
+  }
+},
+{
+  "_key": "Ruby is an object oriented script language",
+  "tags": {
+    "ruby": 100
+  }
+}
+]
+[[0,0.0,0.0],3]
+select Memos   --filter true   --adjuster 'tags @ "groonga" + tags @ "mroonga"'   --output_columns _key,_score
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        3
+      ],
+      [
+        [
+          "_key",
+          "ShortText"
+        ],
+        [
+          "_score",
+          "Int32"
+        ]
+      ],
+      [
+        "Groonga is fast",
+        101
+      ],
+      [
+        "Mroonga is also fast",
+        111
+      ],
+      [
+        "Ruby is an object oriented script language",
+        1
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/adjuster/no_factor.test (+32 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/adjuster/no_factor.test    2014-02-20 15:15:29 +0900 (c9742d9)
@@ -0,0 +1,32 @@
+table_create Tags TABLE_PAT_KEY ShortText
+
+table_create Memos TABLE_HASH_KEY ShortText
+column_create Memos tags COLUMN_INDEX|WITH_WEIGHT Tags
+
+load --table Memos
+[
+{
+  "_key": "Groonga is fast",
+  "tags": {
+    "groonga": 100
+  }
+},
+{
+  "_key": "Mroonga is also fast",
+  "tags": {
+    "mroonga": 100,
+    "groonga": 10
+  }
+},
+{
+  "_key": "Ruby is an object oriented script language",
+  "tags": {
+    "ruby": 100
+  }
+}
+]
+
+select Memos \
+  --filter true \
+  --adjuster 'tags @ "groonga" + tags @ "mroonga"' \
+  --output_columns _key,_score
-------------- next part --------------
HTML����������������������������...
Download 



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