Re: Index/Count/Order by syntax

2010-07-29 Thread Aaron Morton
Yes, but as I said it may not be the optimal design. You may end up with a single row very big row. - you could use multiple rows, each holding a range of counts. - you could use a standard CF and store the count in the row key, then use get_range_slices. Using the random partition you will need to

Re: Index/Count/Order by syntax

2010-07-29 Thread Mark
Ok so basically an "array" of words grouped by their count? Something like this? { SearchLogs : { ALL : { 999: { word1:word1, word2:word2, word3:word3 } 998: { word1:word1, word2:word2, word3:word3 } } } } On 7/29/10 2:50 PM, Aaron Morton wrote: One metho

Re: Index/Count/Order by syntax

2010-07-29 Thread Aaron Morton
One method would be to use a Super Column Family. Have one row, in that create a column family for each count value you have, and then in the super column create a column for each word. Set the CompareWith for the super col to be LongType and the CompareSubcolumnsWith to be AsciiTyoe or UTFType. Yo

Index/Count/Order by syntax

2010-07-28 Thread Mark
I know there is no native support for "order by", "group by" etc but I was wondering how it could be accomplished with some custom indexes? For example, say I have a list of word counts like (notice 2 words have the same count): "cassandra" => 100 "foo" => 999 "bar" => 1 "