8

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 つの制限と順序が必要です。

4

1 に答える 1