Debian Codegraph @

test/command/suite/select/match_columns/section/by_name/prefix/weight.test

raw
1 table_create Memos TABLE_NO_KEY
2 column_create Memos title COLUMN_SCALAR ShortText
3 column_create Memos tags COLUMN_VECTOR ShortText
4
5 load --table Memos
6 [
7 {"title": "Groonga", "tags": ["Groonga"]},
8 {"title": "Rroonga", "tags": ["Groonga", "Rroonga", "Ruby"]},
9 {"title": "Mroonga", "tags": ["Groonga", "Mroonga", "MySQL"]}
10 ]
11
12 table_create Terms TABLE_PAT_KEY ShortText
13 column_create Terms index COLUMN_INDEX|WITH_SECTION Memos title,tags
14
15 select Memos \
16 --match_columns "Terms.index.title * 2" \
17 --query 'G*' \
18 --output_columns title,tags,_score