3 ms·
In a database, yes, a single table with two indexes would efficiently look up followings/followers. But in Cassandra there is no support for secondary indexes,
by strebler 16y ago
In a database, yes, a single table with two indexes would efficiently look up followings/followers.
But in Cassandra there is no support for secondary indexes, so the follower/following data needs to be in separate column families. Then, they each have an index and can be looked up efficiently. (At least as far as I understand things in the NoSQL world)
- dagheti 16y agoSo what happens when you create the follower but not followed index then realize you need it. Is there a way to create that new ColumnFamily without writing a object-by-object program that must traverse all the data? I suppose the concept of data locality doesn't apply, but what is the best way to do that sort of operation?
- buss 16y agoYou'd write a MapReduce program to do it. Cassandra 0.6 has full support for Hadoop.