Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TokenMecab: fix a bug that loose_reading with GET returns extra token
- Loading branch information
Showing
3 changed files
with
64 additions
and
1 deletion.
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
47 changes: 47 additions & 0 deletions
47
test/command/suite/select/query/match/with_index/token_mecab/loose_reading.expected
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,47 @@ | ||
| table_create Menus TABLE_NO_KEY | ||
| [[0,0.0,0.0],true] | ||
| column_create Menus name COLUMN_SCALAR Text | ||
| [[0,0.0,0.0],true] | ||
| table_create Terms TABLE_PAT_KEY ShortText --normalize NormalizerNFKC100 --default_tokenizer 'TokenMecab("loose_reading", true)' | ||
| [[0,0.0,0.0],true] | ||
| column_create Terms index COLUMN_INDEX|WITH_POSITION Menus name | ||
| [[0,0.0,0.0],true] | ||
| load --table Menus | ||
| [ | ||
| {"name": "焼肉定食"}, | ||
| {"name": "やきにく定食"} | ||
| ] | ||
| [[0,0.0,0.0],2] | ||
| select Menus --match_columns name --query "焼き肉" | ||
| [ | ||
| [ | ||
| 0, | ||
| 0.0, | ||
| 0.0 | ||
| ], | ||
| [ | ||
| [ | ||
| [ | ||
| 2 | ||
| ], | ||
| [ | ||
| [ | ||
| "_id", | ||
| "UInt32" | ||
| ], | ||
| [ | ||
| "name", | ||
| "Text" | ||
| ] | ||
| ], | ||
| [ | ||
| 1, | ||
| "焼肉定食" | ||
| ], | ||
| [ | ||
| 2, | ||
| "やきにく定食" | ||
| ] | ||
| ] | ||
| ] | ||
| ] |
15 changes: 15 additions & 0 deletions
15
test/command/suite/select/query/match/with_index/token_mecab/loose_reading.test
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,15 @@ | ||
| table_create Menus TABLE_NO_KEY | ||
| column_create Menus name COLUMN_SCALAR Text | ||
|
|
||
| table_create Terms TABLE_PAT_KEY ShortText \ | ||
| --normalize NormalizerNFKC100 \ | ||
| --default_tokenizer 'TokenMecab("loose_reading", true)' | ||
| column_create Terms index COLUMN_INDEX|WITH_POSITION Menus name | ||
|
|
||
| load --table Menus | ||
| [ | ||
| {"name": "焼肉定食"}, | ||
| {"name": "やきにく定食"} | ||
| ] | ||
|
|
||
| select Menus --match_columns name --query "焼き肉" |