cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Powis <stephen.po...@pardot.com>
Subject Creating secondary index CQL3 cassandra 1.1.1
Date Thu, 21 Jun 2012 03:11:08 GMT
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?

Mime
View raw message