“Bad Request: PRIMARY KEY part to_id cannot be restricted” when trying to select using where condition
Here is my cassandra table for chat kind of application: CREATE TABLE tax_keyspace_dev.chat_messages ( message text, when timestamp, from_id text, to_id text, read boolean, participants text, PRIMARY KEY(participants, when, to_id) ); This query work: select * from tax_keyspace_dev.chat_messages where participants='caone@one.com_shashank_shrivastava@acme.com' order by when; but following queries don't work: select * from tax_keyspace_dev.chat_messages where to_id='caone@one.com' order by when; Error is " Bad Request: PRIMARY KEY part to_id cannot be restricted (preceding part when is either not