有什么技巧做通配符搜索apache cassandra? [英] is there any trick to do wildcards search on apache cassandra?

查看:544
本文介绍了有什么技巧做通配符搜索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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆