| 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 |
] |
| 35 |
|
| 36 |
select Memos \ |
| 37 |
--match_columns "title || content || owner.name" \ |
| 38 |
--query "Alice Rroonga" \ |
| 39 |
--output_columns '_key' |