Is the below select queries are possible for the columnfamily I have defined, because I am getting a bad request error. How should I Model my columnfamily to get the correct results.
CREATE TABLE recordhistory (
userid bigint,
objectid bigint,
operation text,
record_link_id bigint,
time timestamp,
username text,
value map<bigint, text>,
PRIMARY KEY ((userid, objectid), operation, record_link_id, time)
) WITH CLUSTERING ORDER BY (operation ASC, record_link_id ASC, time DESC)
Select Query:
SELECT * FROM recordhistory WHERE userid=439035 AND objectid=20011009 AND operation='update' AND time>=1389205800000 AND time<=1402338600000 ALLOW FILTERING;
Bad Request: PRIMARY KEY column "time" cannot be restricted (preceding column "record_link_id" is either not restricted or by a non-EQ relation)
SELECT * FROM recordhistory WHERE userid=439035 AND objectid=20011009 AND record_link_id=20011063 ALLOW FILTERING;
Bad Request: PRIMARY KEY column "record_link_id" cannot be restricted (preceding column "operation" is either not restricted or by a non-EQ relation)