在将列更新为辅助索引后,Cassandra DB索引数据何时更新 [英] When does Cassandra DB index data after updating a column as secondary index

查看:132
本文介绍了在将列更新为辅助索引后,Cassandra DB索引数据何时更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个辅助索引通过使用更新列...从cassandra-cli,然后我使用commnand测试 get User where code ='MX' ,代码是我放置为索引的列,此命令只返回在创建索引后插入的数据,但以前的数据未返回,我认为以前的数据也将被索引,任何人都有一个线索?
提前感谢

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

推荐答案

在Cassandra中,辅助索引只有在创建后才开始工作。
浏览apache-cassandra库中的SecondaryIndex类。它将帮助你的理解。

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.

这篇关于在将列更新为辅助索引后,Cassandra DB索引数据何时更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆