我是Cassandra的新手,遇到了一个问题。我创建了一个名为demodb的keyspace和一个名为users的表。这个表有3列:id(int和主键)、firstname(varchar)和name(varchar)。这个请求给了我正确的结果:
SELECT * FROM demodb.users WHERE id = 3;
但是这一个:SELECT * FROM demodb.users WHERE firstname = 'francois';
无法工作,我收到以下错误消息:
InvalidRequest: code=2200 [Invalid query] message="No secondary indexes on the restricted columns support the provided operators: "
这个请求也不起作用:
SELECT * FROM users WHERE firstname = 'francois' ORDER BY id DESC LIMIT 5;
InvalidRequest: code=2200 [Invalid query] message="ORDER BY with 2ndary indexes is not supported."
提前致谢。