-
Notifications
You must be signed in to change notification settings - Fork 5
/
README
29 lines (20 loc) · 1.43 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Indexed Collections for Cassandra
NOTE: This has been updated to use the new built-in composite types in Cassandra 0.8.1
You will need to use Hector 0.8.0-2-SNAPSHOT or later and Cassandra 0.8.1 or later.
This is an implementation of the indexing technique described here:
http://www.anuff.com/2010/07/secondary-indexes-in-cassandra.html
The original article describes the use of a custom composite column comparator. A
version of this comparator has recently been added to the latest verion of Cassandra,
meaning that it's no longer necessary to install anthing on the Cassandra instance
to handle composite types.
This is a simplified version of a more complex indexing scheme thats been in used
for some time now as part of a large project. However, this simplified implementation was
largely created from scratch and hasn't been extensively tested.
This indexing, as opposed to Cassandra's built-in secondary indexes, is completely
dynamic. It's possible to create new indexes at any time and the index value types don't
have to be predefined, making use with JSON data easier.
One advantage of this indexing technique is that it combines relationships with mini-indexes
so that you can have a user who's friends with 5 other users and then be able to search the
user's friend list. In this example, the user is what is referred to in the
code as the "container" and the other users are "items".
For examples of use, look at the class IndextText.