order - cassandra ordering or sorting -


need fetch latest result in table without mentioning partion key . example need latest tweets .problems facing follows,

    create table test2.threads(     thread text ,     created_date timestamp,     forum_name text,     subject text,     posted_by text,     last_reply_timestamp timestamp,      primary key (thread,last_reply_timestamp) ) clustering order (last_reply_timestamp desc); 

only if know partion key , can retrive data .

select * test2.threads thread='one' order last_reply_timestamp desc; 

how can latest threads sort desc without mentioning condition?

your data model not suited purpose. partitions not ordered. you'd have loop on partition keys, fetch few , see ones recent @ application level.


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -