incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xu Renjie <>
Subject Re: create secondary index on column family
Date Fri, 22 Mar 2013 11:10:53 GMT
Sorry, continued:
   I have created a column family User with no parameters specified, just
     create column family User.
 Then I checked that the default comparator is BytesType.

  Then I want to create secondary index on one column like below:
  update column family User with column_metadata=[{column_name:name,
validation_class:BytesType, index_type:0}];
But a error is thrown saying "can not parse name as hex bytes".

So I wonder under this situation, is it possible to create index using
cassandra-cli, if possible, how?

Furthermore, I wonder what's the difference of type BytesType and UTF8Type
and other types underlying.
If I store string 'name' into database, do they have the same internal
bytes stored in Cassandra,
just that the UTF8Type needs to be validated before storing the data into
database and BytesType need not to?

On Fri, Mar 22, 2013 at 7:00 PM, Xu Renjie <> wrote:

> Hello, guys:
>    I am new to Cassandra. I am currently using cassandra-cli(version
> 1.1.6).

View raw message