When does Cassandra DB index data after updating a column as secondary index

元气小坏坏 提交于 2019-12-08 07:38:51

问题


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


回答1:


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.




回答2:


You may find this helpful Cassandra secondary indexes



来源:https://stackoverflow.com/questions/10401781/when-does-cassandra-db-index-data-after-updating-a-column-as-secondary-index

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!