forked from groonga/groonga
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add test case when match_columns parameter is changed
When the value of --match_columms parameter is changed, Groonga returns result without using cache.
- Loading branch information
Showing
2 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| table_create Memos TABLE_HASH_KEY ShortText | ||
| [[0,0.0,0.0],true] | ||
| column_create Memos tag COLUMN_SCALAR ShortText | ||
| [[0,0.0,0.0],true] | ||
| load --table Memos | ||
| [ | ||
| {"_key": "Hello Groonga", "tag": "Groonga"}, | ||
| {"_key": "Hello Rroonga!", "tag": "Rroonga"} | ||
| ] | ||
| [[0,0.0,0.0],2] | ||
| select --table Memos --query 'Groonga' --match_columns 'tag' | ||
| [ | ||
| [ | ||
| 0, | ||
| 0.0, | ||
| 0.0 | ||
| ], | ||
| [ | ||
| [ | ||
| [ | ||
| 1 | ||
| ], | ||
| [ | ||
| [ | ||
| "_id", | ||
| "UInt32" | ||
| ], | ||
| [ | ||
| "_key", | ||
| "ShortText" | ||
| ], | ||
| [ | ||
| "tag", | ||
| "ShortText" | ||
| ] | ||
| ], | ||
| [ | ||
| 1, | ||
| "Hello Groonga", | ||
| "Groonga" | ||
| ] | ||
| ] | ||
| ] | ||
| ] | ||
| select --table Memos --query 'Groonga' --match_columns '_key' | ||
| [ | ||
| [ | ||
| 0, | ||
| 0.0, | ||
| 0.0 | ||
| ], | ||
| [ | ||
| [ | ||
| [ | ||
| 0 | ||
| ], | ||
| [ | ||
| [ | ||
| "_id", | ||
| "UInt32" | ||
| ], | ||
| [ | ||
| "_key", | ||
| "ShortText" | ||
| ], | ||
| [ | ||
| "tag", | ||
| "ShortText" | ||
| ] | ||
| ] | ||
| ] | ||
| ] | ||
| ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| table_create Memos TABLE_HASH_KEY ShortText | ||
| column_create Memos tag COLUMN_SCALAR ShortText | ||
|
|
||
| load --table Memos | ||
| [ | ||
| {"_key": "Hello Groonga", "tag": "Groonga"}, | ||
| {"_key": "Hello Rroonga!", "tag": "Rroonga"} | ||
| ] | ||
|
|
||
| select --table Memos \ | ||
| --query 'Groonga' \ | ||
| --match_columns 'tag' | ||
|
|
||
| select --table Memos \ | ||
| --query 'Groonga' \ | ||
| --match_columns '_key' | ||
|
|