Navigation Menu

Skip to content

Commit

Permalink
scorer test: add a test for a score of reference to a vector column
Browse files Browse the repository at this point in the history
  • Loading branch information
komainu8 committed Sep 11, 2018
1 parent 1334897 commit 9576d79
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/command/suite/select/scorer/expression/reference.expected
@@ -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]]]]
11 changes: 11 additions & 0 deletions test/command/suite/select/scorer/expression/reference.test
@@ -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

0 comments on commit 9576d79

Please sign in to comment.