Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add check exist of "WITH SECTION" flag when a full-text search for ve…
…ctor column. Because we can't a full-text search for vector column if we don't set "WITH_SECTION" flag.
- Loading branch information
Showing
3 changed files
with
65 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
25 changes: 25 additions & 0 deletions
25
test/command/suite/column_create/index/without_section.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,25 @@ | ||
| table_create Memos TABLE_NO_KEY | ||
| [[0,0.0,0.0],true] | ||
| column_create Memos content COLUMN_VECTOR ShortText | ||
| [[0,0.0,0.0],true] | ||
| load --table Memos | ||
| [ | ||
| {"content": ["Groonga", "Mroonga", "PGroonga"]}, | ||
| {"content": ["Hello", "Good-bye"]} | ||
| ] | ||
| [[0,0.0,0.0],2] | ||
| table_create Terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto | ||
| [[0,0.0,0.0],true] | ||
| column_create Terms memos_content COLUMN_INDEX|WITH_POSITION Memos content | ||
| [ | ||
| [ | ||
| [ | ||
| -22, | ||
| 0.0, | ||
| 0.0 | ||
| ], | ||
| "grn_obj_set_info(): GRN_INFO_SOURCE: vector column index must be created with WITH_SECTION flag: <Terms.memos_content>" | ||
| ], | ||
| false | ||
| ] | ||
| #|e| grn_obj_set_info(): GRN_INFO_SOURCE: vector column index must be created with WITH_SECTION flag: <Terms.memos_content> |
10 changes: 10 additions & 0 deletions
10
test/command/suite/column_create/index/without_section.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,10 @@ | ||
| table_create Memos TABLE_NO_KEY | ||
| column_create Memos content COLUMN_VECTOR ShortText | ||
| load --table Memos | ||
| [ | ||
| {"content": ["Groonga", "Mroonga", "PGroonga"]}, | ||
| {"content": ["Hello", "Good-bye"]} | ||
| ] | ||
|
|
||
| table_create Terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto | ||
| column_create Terms memos_content COLUMN_INDEX|WITH_POSITION Memos content |