[Groonga-commit] groonga/groonga at 9576d79 [master] scorer test: add a test for a score of reference to a vector column

Back to archive index

Yasuhiro Horimoto null+****@clear*****
Tue Sep 11 12:22:49 JST 2018


Yasuhiro Horimoto	2018-09-11 12:22:49 +0900 (Tue, 11 Sep 2018)

  Revision: 9576d79806744180fecf6f6a63f0993ec105e5e8
  https://github.com/groonga/groonga/commit/9576d79806744180fecf6f6a63f0993ec105e5e8

  Merged 0886781: Merge pull request #870 from komainu8/add_test_to_reference_column_score

  Message:
    scorer test: add a test for a score of reference to a vector column

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

  Added: test/command/suite/select/scorer/expression/reference.expected (+13 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/scorer/expression/reference.expected    2018-09-11 12:22:49 +0900 (84bbe1f6c)
@@ -0,0 +1,13 @@
+table_create Users TABLE_HASH_KEY ShortText
+[[0,0.0,0.0],true]
+table_create Tag TABLE_HASH_KEY ShortText
+[[0,0.0,0.0],true]
+column_create Users tags COLUMN_VECTOR Tag
+[[0,0.0,0.0],true]
+load --table Users
+[
+{"_key": "alice", "tags": ["book", "people"]}
+]
+[[0,0.0,0.0],1]
+select Users   --filter true   --scorer '_score = (tags._key != "")'   --output_columns _score
+[[0,0.0,0.0],[[[1],[["_score","Int32"]],[1]]]]

  Added: test/command/suite/select/scorer/expression/reference.test (+11 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/scorer/expression/reference.test    2018-09-11 12:22:49 +0900 (0726182a8)
@@ -0,0 +1,11 @@
+table_create Users TABLE_HASH_KEY ShortText
+table_create Tag TABLE_HASH_KEY ShortText
+column_create Users tags COLUMN_VECTOR Tag
+load --table Users
+[
+{"_key": "alice", "tags": ["book", "people"]}
+]
+select Users \
+  --filter true \
+  --scorer '_score = (tags._key != "")' \
+  --output_columns _score
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180911/0b4cc6c4/attachment.htm 



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