Cassandra asks for part of the key

I have a cassandra column family that has a row key like 2012-09-30-05-05-42-00: 30: 5856869

I need to request something like

select * from cf where key like %5856869% 

I am currently using Astyanax, it is also possible in astyanax. If not, which implementation will support it.

+4
source share
2 answers

LIKE queries are not supported in Cassandra. If you want to query based on part of the key, you will want to use compound keys. But in this particular case, part of key 5856869 should be the first part for you to do what you want. Remember that with Cassandra you have to write your data the way you expect to read it.

+4
source

No .... you need to write the index manually - this is how you handle such things in Cassandra, or you can try full text search: Full-text search of Cassandra, for example

0
source

All Articles