Debian Codegraph @

test/command/suite/select/index/multi_column/weight.test

raw
1 table_create Bigram TABLE_PAT_KEY ShortText \
2 --default_tokenizer TokenBigramSplitSymbolAlpha \
3 --normalizer NormalizerAuto
4
5 table_create Diaries TABLE_HASH_KEY ShortText
6 column_create Diaries title COLUMN_SCALAR ShortText
7 column_create Diaries content COLUMN_SCALAR Text
8
9 column_create Bigram diaries \
10 COLUMN_INDEX|WITH_POSITION|WITH_SECTION \
11 Diaries title,content
12
13 load --table Diaries
14 [
15 {
16 "_key": "2013-02-06",
17 "title": "groonga",
18 "content": "I found groonga that is a fast fulltext search engine!"
19 },
20 {
21 "_key": "2013-02-07",
22 "title": "mroonga",
23 "content": "I found mroonga that is a MySQL storage engine to use groonga!"
24 },
25 {
26 "_key": "2013-02-08",
27 "title": "rroonga",
28 "content": "I found rroonga that is Ruby bindings for groonga!"
29 }
30 ]
31
32 select Diaries \
33 --match_columns 'Bigram.diaries * 10' \
34 --query 'engine OR mroonga' \
35 --output_columns 'title,_score'