cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sasha Dolgy <>
Subject creating secondary index after data exists
Date Sat, 12 Feb 2011 13:40:56 GMT
hi there,

was playing around today and had a simple CF with sample user data with the
following columns:

| email | name | nickname |

>From the cassandra-cli I ran the following:

 update column family user with column_metadata=[{column_name: nickname,
validation_class: UTF8Type,index_type: KEYS},

{column_name: email, validation_class: UTF8Type, index_type: KEYS}];

Subsequently, when I tried with an index clause to retrieve the rows that
matched my email address (only 1) it returned no results.  It was only after
I performed the following from the cassandra-cli:

set user ['some-random-key']['email'] = 'my@email.address';

That it worked.  Is this normal behaviour?  In that, I should clearly define
which columns I want indexed prior to data population?

Thanks in advance,

Sasha Dolgy

View raw message