[Groonga-commit] groonga/groonga at a2047a4 [master] scorer test: add a test that adds a score

Back to archive index

Yasuhiro Horimoto null+****@clear*****
Tue Sep 11 12:34:43 JST 2018


Yasuhiro Horimoto	2018-09-11 12:34:43 +0900 (Tue, 11 Sep 2018)

  Revision: a2047a4ed8659f8035fb42a3224e579bfd537f4a
  https://github.com/groonga/groonga/commit/a2047a4ed8659f8035fb42a3224e579bfd537f4a

  Merged 715b5c5: Merge pull request #871 from komainu8/add_test_for_add

  Message:
    scorer test: add a test that adds a score

  Added files:
    test/command/suite/select/scorer/expression/add.expected
    test/command/suite/select/scorer/expression/add.test

  Added: test/command/suite/select/scorer/expression/add.expected (+13 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/scorer/expression/add.expected    2018-09-11 12:34:43 +0900 (0f100419f)
@@ -0,0 +1,13 @@
+table_create Users TABLE_HASH_KEY ShortText
+[[0,0.0,0.0],true]
+column_create Users tags COLUMN_SCALAR ShortText
+[[0,0.0,0.0],true]
+column_create Users name COLUMN_SCALAR ShortText
+[[0,0.0,0.0],true]
+load --table Users
+[
+{"_key": "alice", "tags": "wonder", "name": "Alice in Wonderland"}
+]
+[[0,0.0,0.0],1]
+select Users   --filter true   --scorer '_score = (tags @ "wonder") + (name @ "Alice")'   --output_columns _score
+[[0,0.0,0.0],[[[1],[["_score","Int32"]],[2]]]]

  Added: test/command/suite/select/scorer/expression/add.test (+13 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/scorer/expression/add.test    2018-09-11 12:34:43 +0900 (8dfce191b)
@@ -0,0 +1,13 @@
+table_create Users TABLE_HASH_KEY ShortText
+column_create Users tags COLUMN_SCALAR ShortText
+column_create Users name COLUMN_SCALAR ShortText
+
+load --table Users
+[
+{"_key": "alice", "tags": "wonder", "name": "Alice in Wonderland"}
+]
+
+select Users \
+  --filter true \
+  --scorer '_score = (tags @ "wonder") + (name @ "Alice")' \
+  --output_columns _score
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180911/42b01f59/attachment-0001.htm 



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