Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #872 from komainu8/add_test_for_scorer
Browse files Browse the repository at this point in the history
test scorer: add a test that applies "!=" for empty vector column.

Patch by Yasuhiro Horimoto. Thanks!!!
  • Loading branch information
kou committed Sep 25, 2018
2 parents 95f8fd3 + 772f45e commit 1c5ac16
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/command/suite/select/scorer/expression/not_match.expected
@@ -0,0 +1,11 @@
table_create Users TABLE_HASH_KEY ShortText
[[0,0.0,0.0],true]
column_create Users tags COLUMN_VECTOR ShortText
[[0,0.0,0.0],true]
load --table Users
[
{"_key": "alice"}
]
[[0,0.0,0.0],1]
select Users --filter true --scorer '_score = (tags != "")' --output_columns _score
[[0,0.0,0.0],[[[1],[["_score","Int32"]],[0]]]]
7 changes: 7 additions & 0 deletions test/command/suite/select/scorer/expression/not_match.test
@@ -0,0 +1,7 @@
table_create Users TABLE_HASH_KEY ShortText
column_create Users tags COLUMN_VECTOR ShortText
load --table Users
[
{"_key": "alice"}
]
select Users --filter true --scorer '_score = (tags != "")' --output_columns _score

0 comments on commit 1c5ac16

Please sign in to comment.