Originally from the User Slack
@Dhruv_garg: can we create index on user defined types?
e.g. CREATE INDEX ON nudge.rewards_coupon_code (client_id, coupon.code);
@Felipe_Cardeneti_Mendes: Well, not for specific fields yet. You can index the entire UDT column
@Dhruv_garg: so after indexing whole column, I can search on it’s specific fields as well?
like where coupon.code = 'xyz'
, will this work?
@Felipe_Cardeneti_Mendes: Nope, the entire column gets indexed not individual fields atm
@Dhruv_garg: how is that helpful? what kind of queries can I run using that?
@Felipe_Cardeneti_Mendes: Of course 1:1 queries where you require an exact match on the full UDT. You can open an issue to enable indexing individual fields.
IIUC it should be simple with the existing infrastructure to index collection columns, but we’ll likely also discuss compatibility wrt https://issues.apache.org/jira/browse/CASSANDRA-6382 which is not yet solved by cassandra as well
@Dhruv_garg: got it, thanks