1
votes

I've a created a secondary index by using update column ... from cassandra-cli , then I tested by using commnand get User where code = 'MX' , code was the column I put as index, this command just returns data inserted after index creation, but data before is not returned , I thought that previous data would be indexed too , anyone has a clue? thanks in advance

2
What command did you use to update index ? when i update CF with index ,it has historical data too on queryingPeter
@Peter I was using Cassandra 1.0.8 and ran this command update column family XXXX with comparator = 'UTF8Type' and column_metadata = [ ...... , {column_name : 'myColumnWithSecIndex',validation_class : UTF8Type,index_type : KEYS}];Leo

2 Answers

2
votes

In Cassandra, secondary index starts working only after it is being created. Go through the SecondaryIndex class in apache-cassandra library. It will help you in understanding.

0
votes