cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Ezquerro <j...@sofistic.net>
Subject Re: CQL results are confusing me
Date Mon, 20 Aug 2012 17:43:43 GMT
EmailAddress is not indexed, must declare key for this before can do a
search.

2012/8/20 Peter Morris <mrpmorris@gmail.com>

> Consider the following statements
>
> #1 New family is created so I have no data
> create columnfamily Test (UserName varchar primary key, EmailAddress
> varchar);
>
> #2 Count how many rows I have
> select count(1) from Test;
> -Expected: 0
> -Actual: 0
>
> #3 Select all users with a specific email address
> select * from Test where EmailAddress = 'x';
> -Expected: Zero rows
> -Actual: Bad Request: No indexed columns present in by-columns clause with
> "equals" operator
>
>
> #4 Select all users with a specific user name (primary key)
> select * from Test where UserName = 'x';
> -Expected: Zero rows
> -Actual: 1 row with 1 column 'UserName' = 'x';
>
>
> I am simply trying to determine if a user already exists with a specific
> email address or with a specific user name.  Item #4 is the most confusing,
> what is going on?
>



-- 
Juan Ezquerro LLanes <Sofistic Team>

Telf: 618349107/964051479

Mime
View raw message