table_create Tags TABLE_PAT_KEY ShortText [[0,0.0,0.0],true] table_create Memos TABLE_HASH_KEY ShortText [[0,0.0,0.0],true] column_create Memos date COLUMN_SCALAR Time [[0,0.0,0.0],true] column_create Memos tag COLUMN_SCALAR Tags [[0,0.0,0.0],true] column_create Tags memos_tag COLUMN_INDEX Memos tag [[0,0.0,0.0],true] load --table Memos [ {"_key": "Groonga is fast!", "date": "2016-05-19 12:00:00", "tag": "Groonga"}, {"_key": "Mroonga is fast!", "date": "2016-05-19 12:00:01", "tag": "Mroonga"}, {"_key": "Groonga sticker!", "date": "2016-05-19 12:00:02", "tag": "Groonga"}, {"_key": "Groonga site!", "date": "2016-05-19 12:00:02", "tag": "Groonga"}, {"_key": "Rroonga is fast!", "date": "2016-05-19 12:00:03", "tag": "Rroonga"} ] [[0,0.0,0.0],5] select Memos --filter 'date < "2016-05-19 13:00:02"' --slices[groonga].filter 'tag @ "Groonga"' --slices[groonga].sort_keys '_id' --slices[groonga].output_columns '_key, date, tag' --drilldowns[tags].table groonga --drilldowns[tags].keys date [ [ 0, 0.0, 0.0 ], [ [ [ 5 ], [ [ "_id", "UInt32" ], [ "_key", "ShortText" ], [ "date", "Time" ], [ "tag", "Tags" ] ], [ 1, "Groonga is fast!", 1463626800.0, "Groonga" ], [ 2, "Mroonga is fast!", 1463626801.0, "Mroonga" ], [ 3, "Groonga sticker!", 1463626802.0, "Groonga" ], [ 4, "Groonga site!", 1463626802.0, "Groonga" ], [ 5, "Rroonga is fast!", 1463626803.0, "Rroonga" ] ], { "groonga": [ [ 3 ], [ [ "_key", "ShortText" ], [ "date", "Time" ], [ "tag", "Tags" ] ], [ "Groonga is fast!", 1463626800.0, "Groonga" ], [ "Groonga sticker!", 1463626802.0, "Groonga" ], [ "Groonga site!", 1463626802.0, "Groonga" ] ] }, { "tags": [ [ 2 ], [ [ "_key", "Time" ], [ "_nsubrecs", "Int32" ] ], [ 1463626800.0, 1 ], [ 1463626802.0, 2 ] ] } ] ]