cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryabin, Thomas" <Thomas.Rya...@McKesson.com>
Subject How to add secondary index to existing column family with CLI?
Date Mon, 20 Aug 2012 17:15:36 GMT
I want to add a secondary index to an existing column family, but am running into some trouble.
I'm trying to use the Cassandra CLI to add the secondary index. The column family is called
"books", the column I'm trying to index is called "title", the key validation class is UTF8Type,
and the default column value validator is BytesType.

I first tried running this command with no success:
update column family books with column_metadata=[{column_name: title, index_type: KEYS}];

I got the error:
                cannot parse 'title' as hex bytes.


I then tried running:
update column family books with column_metadata=[{column_name: utf8('title'), index_type:
KEYS}];

but got the error:
                cannot parse 'FUNCTION_CALL' as hex bytes


Is there something I should be doing differently?

Thanks,
Thomas



Mime
View raw message