Navigation Menu

Skip to content

Commit

Permalink
test: add missing similar search threshold in filter tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Feb 13, 2018
1 parent f168108 commit e542731
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
42 changes: 42 additions & 0 deletions test/command/suite/select/filter/similar/threshold.expected
@@ -0,0 +1,42 @@
table_create Data TABLE_NO_KEY
[[0,0.0,0.0],true]
column_create Data content COLUMN_SCALAR ShortText
[[0,0.0,0.0],true]
table_create Terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto
[[0,0.0,0.0],true]
column_create Terms data_content COLUMN_INDEX|WITH_POSITION Data content
[[0,0.0,0.0],true]
load --table Data
[
{"content": "a a a b b c d e f g h i j k"}
]
[[0,0.0,0.0],1]
select --table Data --filter 'content *S2 "a b c"' --output_columns content,_score --sortby _id
[
[
0,
0.0,
0.0
],
[
[
[
1
],
[
[
"content",
"ShortText"
],
[
"_score",
"Int32"
]
],
[
"a a a b b c d e f g h i j k",
2097155
]
]
]
]
18 changes: 18 additions & 0 deletions test/command/suite/select/filter/similar/threshold.test
@@ -0,0 +1,18 @@
table_create Data TABLE_NO_KEY
column_create Data content COLUMN_SCALAR ShortText

table_create Terms TABLE_PAT_KEY ShortText \
--default_tokenizer TokenBigram \
--normalizer NormalizerAuto
column_create Terms data_content COLUMN_INDEX|WITH_POSITION Data content

load --table Data
[
{"content": "a a a b b c d e f g h i j k"}
]

select \
--table Data \
--filter 'content *S2 "a b c"' \
--output_columns content,_score \
--sortby _id

0 comments on commit e542731

Please sign in to comment.