you get one "sort" for free, which is the column sort you specify with CompareWith
two, if you use OrderPreservingPartitioner (whcih lets you specify key sort order) On Sun, Jan 17, 2010 at 5:18 PM, Alex Dong <alex.d...@binaryplex.com> wrote: > Hi folks, > > I'm new to Cassandra. I'm evaluating Cassandra, HBase and Voldemort to see > which one matches our app model better. Here is a typical data model: > > stats { > word_id: { > user_id: { > total_hits: 193, > monthly_hits: [2, 31, 21, 10, 10, 7, 8, 0, 0, 0, 1, > 2] > }, > .. > } > ... > } > > I'm sure that I can pull all the data out from Cassandra and use mapreduce > to sort or merge. But I'm wondering are there any way in cassandra to > 'automate' this process: > 1) for a given 'word_id', get a list of user_id: { } sorted by > 'total_hits'? > 2) for two 'word_id's, get an 'intersect' result of the user: {} list sorted > by the combined 'total_hits'? > > Cheers, > Alex >