incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Powis <stephen.po...@pardot.com>
Subject Re: Creating secondary index CQL3 cassandra 1.1.1
Date Thu, 21 Jun 2012 22:17:18 GMT
Ah yes that's it exactly, including the time outs/errors.  I wonder why
this didn't come up when I googled the error from my system logs.

Thanks!
Stephen

On Thu, Jun 21, 2012 at 2:47 AM, Sylvain Lebresne <sylvain@datastax.com>wrote:

> On Thu, Jun 21, 2012 at 5:11 AM, Stephen Powis <stephen.powis@pardot.com>
> wrote:
> > I have the following schema:
> >
> > describe columnfamily visitor_audit;
> >
> > CREATE TABLE visitor_audit (
> >   visitor_id text,
> >   audit_id uuid,
> >   account_id int,
> >   audit_type int,
> >   created_at text,
> >   PRIMARY KEY (visitor_id, audit_id)
> > ) WITH
> >   comment='' AND
> >   caching='KEYS_ONLY' AND
> >   read_repair_chance=0.100000 AND
> >   gc_grace_seconds=864000 AND
> >   min_compaction_threshold=4 AND
> >   max_compaction_threshold=32 AND
> >   replicate_on_write='true' AND
> >   compaction_strategy_class='SizeTieredCompactionStrategy' AND
> >   compression_parameters:sstable_compression='SnappyCompressor';
> >
> > I then created an index by executing the following:
> > CREATE INDEX ix_accountid ON visitor_audit (account_id);
> >
> > When I attempt to execute: select * from visitor_audit where
> account_id=1;
> > Nothing is returned even tho I have rows with account_id equal to 1.
> >
> > Is there anything I am missing here?
>
> You are pretty much hitting
> https://issues.apache.org/jira/browse/CASSANDRA-4328.
> In other words, secondary indexes is not yet supported on table with
> composite PRIMARY KEY, but we don't correctly reject the CREATE INDEX
> command.
>
> --
> Sylvain
>

Mime
View raw message