Debian Codegraph @

test/command/suite/select/drilldowns/keys/vector.test

raw
1 table_create Users TABLE_HASH_KEY ShortText
2
3 table_create Memos TABLE_HASH_KEY ShortText
4 column_create Memos user COLUMN_SCALAR Users
5 column_create Memos date COLUMN_SCALAR Time
6 column_create Memos tags COLUMN_VECTOR ShortText
7
8 load --table Memos
9 [
10 {"_key": "Groonga is fast!", "user": "alice", "date": "2014-11-16 00:00:00",
11 "tags": ["Groonga"]},
12 {"_key": "Mroonga is fast!", "user": "alice", "date": "2014-11-16 00:00:00",
13 "tags": ["Mroonga", "Groonga"]},
14 {"_key": "Groonga sticker!", "user": "alice", "date": "2014-11-16 00:00:00",
15 "tags": ["Groonga"]},
16 {"_key": "Rroonga is fast!", "user": "alice", "date": "2014-11-17 00:00:00",
17 "tags": ["Rroonga", "Groonga"]},
18 {"_key": "Groonga is good!", "user": "alice", "date": "2014-11-17 00:00:00",
19 "tags": ["Groonga"]}
20 ]
21
22 select Memos \
23 --limit 0 \
24 --output_columns _id \
25 --drilldowns[vector].keys user,tags,date \
26 --drilldowns[vector].output_columns _key[0],_key[1],_key[2],_nsubrecs \
27 --drilldowns[vector].sortby -_nsubrecs,_id