Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a bug that 'index[0]' only match_columns doesn't use section ID
- Loading branch information
Showing
3 changed files
with
79 additions
and
3 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
54 changes: 54 additions & 0 deletions
54
test/command/suite/select/match_columns/section/by_index/single.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,54 @@ | ||
| table_create Memos TABLE_NO_KEY | ||
| [[0,0.0,0.0],true] | ||
| column_create Memos title COLUMN_SCALAR ShortText | ||
| [[0,0.0,0.0],true] | ||
| column_create Memos content COLUMN_SCALAR ShortText | ||
| [[0,0.0,0.0],true] | ||
| table_create Lexicon TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram | ||
| [[0,0.0,0.0],true] | ||
| column_create Lexicon memo_index COLUMN_INDEX|WITH_POSITION|WITH_SECTION Memos title,content | ||
| [[0,0.0,0.0],true] | ||
| load --table Memos | ||
| [ | ||
| ["title", "content"], | ||
| ["groonga", "Start groonga!"], | ||
| ["mroonga", "Start mroonga!"], | ||
| ["rroonga", "Start rroonga!"], | ||
| ["Ruby", "Start Ruby!"], | ||
| ["learn", "Learning Ruby and groonga..."] | ||
| ] | ||
| [[0,0.0,0.0],5] | ||
| select Memos --match_columns "Lexicon.memo_index[0]" --query Ruby --output_columns "title, content, _score" | ||
| [ | ||
| [ | ||
| 0, | ||
| 0.0, | ||
| 0.0 | ||
| ], | ||
| [ | ||
| [ | ||
| [ | ||
| 1 | ||
| ], | ||
| [ | ||
| [ | ||
| "title", | ||
| "ShortText" | ||
| ], | ||
| [ | ||
| "content", | ||
| "ShortText" | ||
| ], | ||
| [ | ||
| "_score", | ||
| "Int32" | ||
| ] | ||
| ], | ||
| [ | ||
| "Ruby", | ||
| "Start Ruby!", | ||
| 1 | ||
| ] | ||
| ] | ||
| ] | ||
| ] |
22 changes: 22 additions & 0 deletions
22
test/command/suite/select/match_columns/section/by_index/single.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,22 @@ | ||
| table_create Memos TABLE_NO_KEY | ||
| column_create Memos title COLUMN_SCALAR ShortText | ||
| column_create Memos content COLUMN_SCALAR ShortText | ||
|
|
||
| table_create Lexicon TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram | ||
| column_create Lexicon memo_index COLUMN_INDEX|WITH_POSITION|WITH_SECTION \ | ||
| Memos title,content | ||
|
|
||
| load --table Memos | ||
| [ | ||
| ["title", "content"], | ||
| ["groonga", "Start groonga!"], | ||
| ["mroonga", "Start mroonga!"], | ||
| ["rroonga", "Start rroonga!"], | ||
| ["Ruby", "Start Ruby!"], | ||
| ["learn", "Learning Ruby and groonga..."] | ||
| ] | ||
|
|
||
| select Memos \ | ||
| --match_columns "Lexicon.memo_index[0]" \ | ||
| --query Ruby \ | ||
| --output_columns "title, content, _score" |