incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Ellis <jbel...@gmail.com>
Subject Re: creating secondary index after data exists
Date Sat, 12 Feb 2011 16:12:33 GMT
index creation isn't instant, no.

cli describe keyspace will tell you which ones are still building.

On Sat, Feb 12, 2011 at 7:40 AM, Sasha Dolgy <sdolgy@gmail.com> wrote:
> 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,
> -sd
> --
> Sasha Dolgy
> sasha.dolgy@gmail.com
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com

Mime
View raw message