Navigation Menu

Skip to content

Commit

Permalink
test adjuster: add no factor case
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Feb 20, 2014
1 parent 6e2c523 commit e3b51cb
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 0 deletions.
66 changes: 66 additions & 0 deletions test/command/suite/select/adjuster/no_factor.expected
@@ -0,0 +1,66 @@
table_create Tags TABLE_PAT_KEY ShortText
[[0,0.0,0.0],true]
table_create Memos TABLE_HASH_KEY ShortText
[[0,0.0,0.0],true]
column_create Memos tags COLUMN_INDEX|WITH_WEIGHT Tags
[[0,0.0,0.0],true]
load --table Memos
[
{
"_key": "Groonga is fast",
"tags": {
"groonga": 100
}
},
{
"_key": "Mroonga is also fast",
"tags": {
"mroonga": 100,
"groonga": 10
}
},
{
"_key": "Ruby is an object oriented script language",
"tags": {
"ruby": 100
}
}
]
[[0,0.0,0.0],3]
select Memos --filter true --adjuster 'tags @ "groonga" + tags @ "mroonga"' --output_columns _key,_score
[
[
0,
0.0,
0.0
],
[
[
[
3
],
[
[
"_key",
"ShortText"
],
[
"_score",
"Int32"
]
],
[
"Groonga is fast",
101
],
[
"Mroonga is also fast",
111
],
[
"Ruby is an object oriented script language",
1
]
]
]
]
32 changes: 32 additions & 0 deletions test/command/suite/select/adjuster/no_factor.test
@@ -0,0 +1,32 @@
table_create Tags TABLE_PAT_KEY ShortText

table_create Memos TABLE_HASH_KEY ShortText
column_create Memos tags COLUMN_INDEX|WITH_WEIGHT Tags

load --table Memos
[
{
"_key": "Groonga is fast",
"tags": {
"groonga": 100
}
},
{
"_key": "Mroonga is also fast",
"tags": {
"mroonga": 100,
"groonga": 10
}
},
{
"_key": "Ruby is an object oriented script language",
"tags": {
"ruby": 100
}
}
]

select Memos \
--filter true \
--adjuster 'tags @ "groonga" + tags @ "mroonga"' \
--output_columns _key,_score

0 comments on commit e3b51cb

Please sign in to comment.