Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is there any trick to do wildcards search on apache cassandra?

i need to do something like this on apache cassandra, SELECT * FROM mytable where address = "%indonesia%"

any idea how to do it on cassandra?

like image 352
zho Avatar asked Oct 15 '22 03:10

zho


1 Answers

Its not supported out of the box. You must maintain your own indices.

I would recommend to use "Supercolumn index" or use a order preserving partitioner (e.g. org.apache.cassandra.dht.OrderPreservingPartioner) in conjunction with range queries.

Take a look at the slides from Benjamin Black's excellent talk about cassandra and index

like image 60
Schildmeijer Avatar answered Oct 18 '22 14:10

Schildmeijer