I am following "CQL3 for Cassandra experts" (http://www.datastax.com/dev/blog/cql3-for-cassandra-experts#comment-259613) article. Executing
CREATE TABLE playlists (
id uuid,
title text,
album text,
artist text,
song_id uuid,
PRIMARY KEY (id, title, album, artist)
);
works fine. But when trying to run
CREATE INDEX ON playlists(artist);
I get an error:
An error occurred when executing the SQL command:
CREATE INDEX ON playlists(artist)
Cannot create index on PRIMARY KEY part artist
‘CREATE INDEX ON playlists(artist)’
The article says that it should work fine. Is it a bug or am I doing something wrong?
I am running Cassandra 1.2.4 and connecting to it using JDBC 1.2.5 driver.