Debian Codegraph @

test/command/suite/select/match_columns/nested/multiple_forward.test

raw
1 table_create Memos TABLE_HASH_KEY ShortText
2 column_create Memos title COLUMN_SCALAR ShortText
3 column_create Memos content COLUMN_SCALAR ShortText
4
5 table_create Lexicon TABLE_PAT_KEY ShortText \
6 --default_tokenizer TokenBigram \
7 --normalizer NormalizerNFKC121
8 column_create Lexicon memo_title COLUMN_INDEX|WITH_POSITION Memos title
9 column_create Lexicon memo_content COLUMN_INDEX|WITH_POSITION Memos content
10
11 load --table Memos
12 [
13 {"_key": "groonga", "title": "Groonga", "content": "Start Groonga!"},
14 {"_key": "mroonga", "title": "Mroonga", "content": "Start Mroonga!"},
15 {"_key": "rroonga", "title": "Rroonga", "content": "Start Rroonga!"},
16 {"_key": "ruby", "title": "Ruby", "content": "Start Ruby!"},
17 {"_key": "learn", "title": "Learn", "content": "Learning Ruby and Groonga..."}
18 ]
19
20 table_create Notes TABLE_HASH_KEY ShortText
21 column_create Notes memo COLUMN_SCALAR Memos
22 column_create Memos notes COLUMN_INDEX Notes memo
23
24 load --table Notes
25 [
26 {"_key": "Groonga", "memo": "groonga"},
27 {"_key": "Mroonga", "memo": "mroonga"},
28 {"_key": "Rroonga", "memo": "rroonga"},
29 {"_key": "Ruby", "memo": "ruby"},
30 {"_key": "Learn", "memo": "learn"}
31 ]
32
33 select Notes \
34 --match_columns "memo.title || memo.content" \
35 --query rroonga \
36 --output_columns _key,_score