使用CF:
CREATE TABLE history (
domain text,
iid text,
timeid timeuuid,
data text,
comments text,
PRIMARY KEY (domain, iid, timeid)
);
Run Code Online (Sandbox Code Playgroud)
我想像这样查询:
select domain, iid, timeid, data, comments from mappings
where domain = 'a' and iid = 'b' order by timeid desc;
Run Code Online (Sandbox Code Playgroud)
但它失败并出现以下错误(cassandra 1.1.5):
Bad Request: Order by currently only support the ordering of columns following their declared order in the PRIMARY KEY
Run Code Online (Sandbox Code Playgroud)
我做错了吗?可能的解决方法是什么?谢谢
PS我使用单一的EQ限制和ORDER BY,但我需要至少2个限制和排序.