incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rommel Garcia <groups.no...@gmail.com>
Subject Secondary Index not working?
Date Fri, 11 Mar 2011 03:28:39 GMT
I tried the tutorial on this site - http://www.datastax.com/docs/0.7/data_model/secondary_indexes
and worked on creating an index on a new column. That went good. But when I indexed an existing
column, my query below returns 0 row where in fact it should return 1.

Query:

get users where state = 'GA' and birth_date > 1970;

Here's my Column Family Metadata:
Column Families:
    ColumnFamily: users
      Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type
      Row cache size / save period: 0.0/0
      Key cache size / save period: 200000.0/14400
      Memtable thresholds: 0.29062499999999997/62/60
      GC grace seconds: 864000
      Compaction min/max thresholds: 4/32
      Read repair chance: 1.0
      Built indexes: [users.62697274685f64617465, users.7374617465]
      Column Metadata:
        Column Name: full_name (full_name)
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type
        Column Name: state (state)
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type
          Index Type: KEYS
        Column Name: birth_date (birth_date)
          Validation Class: org.apache.cassandra.db.marshal.LongType
          Index Type: KEYS

Here's the data set:

RowKey: birt_date
=> (column=birth_date, value=1973, timestamp=1299200995417000)
=> (column=full_name, value=Patrick Rothfuss, timestamp=1299200746636000)
=> (column=state, value=GA, timestamp=1299200968945000)

I'm not sure what I'm missing. Appreciate any help!

Rom




Mime
View raw message