当前收到此错误消息:
错误请求:预期密钥“KEY”将出现在“UserGameAnswers”的 WHERE 子句中
cqlsh:godofsports> UPDATE UserGameAnswers SET 'status' = 'thing' WHERE 'event_question_id' = '7';
Bad Request: Expected key 'KEY' to be present in WHERE clause for 'UserGameAnswers'
鉴于我有一个针对此列键的索引(见下文)并且应该允许这样做我做错了什么?
cqlsh:godofsports> DESCRIBE COLUMNFAMILY UserGameAnswers;
CREATE TABLE UserGameAnswers (
KEY text PRIMARY KEY,
event_question_id text
) WITH
comment='' AND
comparator=ascii AND
read_repair_chance=0.100000 AND
gc_grace_seconds=864000 AND
default_validation=text AND
min_compaction_threshold=4 AND
max_compaction_threshold=32 AND
replicate_on_write='true' AND
compaction_strategy_class='SizeTieredCompactionStrategy' AND
compression_parameters:sstable_compression='SnappyCompressor';
CREATE INDEX event_question_id_idx ON UserGameAnswers (event_question_id);
我是否需要先进行查询以获取实际的 KEY?:(