Debian Codegraph @

test/command/suite/select/query/weight_vector.test

raw
1 table_create Memos TABLE_HASH_KEY ShortText
2 column_create Memos tags COLUMN_VECTOR|WITH_WEIGHT ShortText
3
4 load --table Memos
5 [
6 {
7 "_key": "Groonga is fast",
8 "tags": {
9 "groonga": 100
10 }
11 },
12 {
13 "_key": "Mroonga is also fast",
14 "tags": {
15 "mroonga": 100,
16 "groonga": 10
17 }
18 },
19 {
20 "_key": "Ruby is an object oriented script language",
21 "tags": {
22 "ruby": 100
23 }
24 }
25 ]
26
27 table_create Tags TABLE_PAT_KEY ShortText
28 column_create Tags memos_tags COLUMN_INDEX|WITH_WEIGHT Memos tags
29
30 select Memos \
31 --match_columns tags \
32 --query groonga \
33 --output_columns _key,_score