Debian Codegraph @

test/command/suite/select/index/nested/match_columns/last/or.test

raw
1 table_create Users TABLE_PAT_KEY ShortText
2 column_create Users name COLUMN_SCALAR ShortText
3
4 table_create Memos TABLE_PAT_KEY ShortText
5 column_create Memos owner COLUMN_SCALAR Users
6 column_create Memos title COLUMN_SCALAR ShortText
7 column_create Memos content COLUMN_SCALAR Text
8
9 table_create Terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram
10 column_create Terms users_name COLUMN_INDEX|WITH_SECTION|WITH_POSITION \
11 Users name
12 column_create Terms memos_title COLUMN_INDEX|WITH_SECTION|WITH_POSITION \
13 Memos title
14 column_create Terms memos_content COLUMN_INDEX|WITH_SECTION|WITH_POSITION \
15 Memos content
16
17 column_create Users memos COLUMN_INDEX Memos owner
18
19 load --table Users
20 [
21 {"_key": "alice", "name": "Alice"},
22 {"_key": "bob", "name": "Bob"},
23 {"_key": "carlos", "name": "Carlos"}
24 ]
25
26 load --table Memos
27 [
28 {"_key": "alice1", "owner": "alice",
29 "title": "Groonga", "content": "Groonga is full text search engine."},
30 {"_key": "alice2", "owner": "alice",
31 "title": "Rroonga", "content": "Rroonga is the Ruby bindings of Groonga."},
32 {"_key": "bob1", "owner": "bob",
33 "title": "Mroonga", "content": "Mroonga is a MySAL storage engine based on Groonga."},
34 {"_key": "carlos1", "owner": "carlos",
35 "title": "Nroonga", "content": "Nroonga is the node.js bindings of Groonga.."}
36 ]
37
38 select Memos \
39 --match_columns "title || content || owner.name" \
40 --query "Carlos OR Mroonga" \
41 --output_columns '_key'