Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Database cassandra数据库中的通配符搜索_Database_Search_Cassandra_Wildcard - Fatal编程技术网

Database cassandra数据库中的通配符搜索

Database cassandra数据库中的通配符搜索,database,search,cassandra,wildcard,Database,Search,Cassandra,Wildcard,我想知道是否有任何方法可以在cassandra数据库中执行通配符搜索。 e、 g 或 类似这样的情况。在Cassandra中没有执行此类查询的本机方法。实现相同目标的典型选项有 a) 在可能的搜索词上自己维护索引。例如,每当插入用户名中包含hello的条目时,请在索引列族中插入一个条目,其中hello作为键,列值作为数据条目的键。在查询时,查询索引CF,然后从数据CF中获取数据。当然,这在本质上是非常有限制的,但对于一些基本需求可能很有用 b) 更好的选择是使用全文搜索引擎。看看Solandra

我想知道是否有任何方法可以在cassandra数据库中执行通配符搜索。 e、 g


类似这样的情况。

在Cassandra中没有执行此类查询的本机方法。实现相同目标的典型选项有

a) 在可能的搜索词上自己维护索引。例如,每当插入用户名中包含hello的条目时,请在索引列族中插入一个条目,其中hello作为键,列值作为数据条目的键。在查询时,查询索引CF,然后从数据CF中获取数据。当然,这在本质上是非常有限制的,但对于一些基本需求可能很有用


b) 更好的选择是使用全文搜索引擎。看看Solandra或Datastax enterprise,这个项目看起来也很有希望

我最近没有深入研究它,但当我上次评估它时,它看起来很有希望

select KEY,username,password from User where username='\*hello*';
select KEY,username,password from User where username='%hello%';