| 1 |
#@on-error omit |
| 2 |
plugin_register sharding |
| 3 |
#@on-error default |
| 4 |
|
| 5 |
table_create Memos_20170416 TABLE_NO_KEY |
| 6 |
column_create Memos_20170416 timestamp COLUMN_SCALAR Time |
| 7 |
column_create Memos_20170416 title COLUMN_SCALAR Text |
| 8 |
column_create Memos_20170416 content COLUMN_SCALAR Text |
| 9 |
|
| 10 |
table_create Memos_20170417 TABLE_NO_KEY |
| 11 |
column_create Memos_20170417 timestamp COLUMN_SCALAR Time |
| 12 |
column_create Memos_20170417 title COLUMN_SCALAR Text |
| 13 |
column_create Memos_20170417 content COLUMN_SCALAR Text |
| 14 |
|
| 15 |
load --table Memos_20170416 |
| 16 |
[ |
| 17 |
{"timestamp": "2017/04/16 10:00:00", "title": "Easy PGroonga", "content": "PGroonga is fast and easy to use."}, |
| 18 |
{"timestamp": "2017/04/16 11:00:00", "title": "Easy Rroonga", "content": "Rroonga is fast and easy to use."} |
| 19 |
] |
| 20 |
|
| 21 |
load --table Memos_20170417 |
| 22 |
[ |
| 23 |
{"timestamp": "2017/04/17 00:00:00", "title": "Easy Groonga", "content": "Groonga is fast."}, |
| 24 |
{"timestamp": "2017/04/17 01:00:00", "title": "Easy Mroonga", "content": "Mroonga is fast and easy to use."} |
| 25 |
] |
| 26 |
|
| 27 |
logical_select Memos \ |
| 28 |
--shard_key timestamp \ |
| 29 |
--query easy \ |
| 30 |
--match_columns 'title' |
| 31 |
|
| 32 |
logical_select Memos \ |
| 33 |
--shard_key timestamp \ |
| 34 |
--query easy \ |
| 35 |
--match_columns 'content' |