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