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