Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/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
Cassandra “选择…输入…”操作员不工作_Cassandra_Composite Key - Fatal编程技术网

Cassandra “选择…输入…”操作员不工作

Cassandra “选择…输入…”操作员不工作,cassandra,composite-key,Cassandra,Composite Key,卡桑德拉-1.1.2。 模式是这样的 CREATE TABLE contacts ( userid text, contactid text, groups text, name text, PRIMARY KEY (userid, contactid) ) 它包含的所有日期 cqlsh:contactks> select * from contacts; userid | contactid | groups | n

卡桑德拉-1.1.2。 模式是这样的

CREATE TABLE contacts ( userid text, contactid text, groups text, name text, PRIMARY KEY (userid, contactid) ) 它包含的所有日期

cqlsh:contactks> select * from contacts; userid | contactid | groups | name --------+-----------+--------+------ a | a11 | a13 | a12 a | a21 | a23 | a22 a | a31 | a33 | a32 b | b11 | b13 | b12 所以我提出这样一个问题:

cqlsh:contactks> select * from contacts where contactid in ('a11', 'a21'); cqlsh:contactks> 不返回任何内容!!! 在不将contactid作为分区键的情况下,如何使用IN选项获取值?
非常感谢。

我认为您需要实现on contactid,以便在where子句中进行搜索。

我认为您需要实现on contactid,以便在where子句中进行搜索。

对不起,我使用cassandra-1.1.2作为thd数据库。对不起,我使用cassandra-1.1.2作为thd数据库,但是我不能在contactscontactid上执行创建索引;对于错误请求:具有复合主索引的表尚不支持辅助索引KEY@user1600104我认为这是一个众所周知的问题。请参阅,因此我必须使用一个主键创建表…并在ContactId上创建索引,但我无法在contactscontactid上执行创建索引;对于错误请求:具有复合主索引的表尚不支持辅助索引KEY@user1600104我认为这是一个众所周知的问题。请参阅,因此我必须使用一个主键创建表…并在contactid上创建索引