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


Reply via email to