Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cassandra/3.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
Solr 如何在select子句中使用自定义索引查询cassandra表_Solr_Cassandra_Cql_Datastax - Fatal编程技术网

Solr 如何在select子句中使用自定义索引查询cassandra表

Solr 如何在select子句中使用自定义索引查询cassandra表,solr,cassandra,cql,datastax,Solr,Cassandra,Cql,Datastax,我有一个由solr在cassandra表上创建的自定义索引 CREATE CUSTOM INDEX custom_index ON table_name (column) USING 'com.datastax.bdp.search.solr.Cql3SolrSecondaryIndex'; 据我所知,在cassandra的select子句中,select查询只能在where子句中使用主键 我可以在where子句中使用此自定义索引吗?可以。您可以在where子句中使用分区键和索引。但如果您想使

我有一个由solr在cassandra表上创建的自定义索引

CREATE CUSTOM INDEX custom_index ON table_name (column) USING 'com.datastax.bdp.search.solr.Cql3SolrSecondaryIndex';
据我所知,在cassandra的select子句中,select查询只能在where子句中使用主键


我可以在where子句中使用此自定义索引吗?

可以。您可以在where子句中使用分区键和索引。但如果您想使用不带分区键的索引列,则必须指定“允许筛选”(请参见下面的示例)

SELECT*其中>100允许过滤;

当然,在本例中必须是数字类型。

为了基于lucene solr索引运行CQL查询,您必须安装DataStax Enterprise 4.6并使用“solr_query”特殊列,如下所述:

非常感谢。有了这些,我注意到我们必须进行一个类似WHERE solr_query='name:cat name:dog-name:fish'的查询。有没有其他方法可以在where='XXX'中执行?
SELECT * FROM <myColumnFamilly> WHERE <column> > 100 ALLOW FILTERING;