有什么技巧做通配符搜索apache cassandra? [英] is there any trick to do wildcards search on apache cassandra?
问题描述
我需要在apache cassandra上做这样的事情,
SELECT * FROM mytable where address =%indonesia%
i need to do something like this on apache cassandra, SELECT * FROM mytable where address = "%indonesia%"
它在cassandra?
any idea how to do it on cassandra?
推荐答案
它不支持开箱即用。您必须维护自己的索引。
Its not supported out of the box. You must maintain your own indices.
我建议使用超级列索引或使用一个命令保存分区器(例如org.apache.cassandra.dht.OrderPreservingPartioner)结合范围查询。
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.
查看幻灯片从本杰明·布莱斯关于cassandra和索引的优秀谈话
Take a look at the slides from Benjamin Black's excellent talk about cassandra and index
这篇关于有什么技巧做通配符搜索apache cassandra?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!