incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Morton <aa...@thelastpickle.com>
Subject Re: R: Re: Sorting in Cassandra
Date Wed, 06 Oct 2010 09:50:03 GMT
Your sort of right for point two. The comparators you define in the keyspace def are for the
names of the columns (or super columns) not their values. So it's not possible to sort by
the value of your name column, you'll need to do it client side.

The indexing features in 0.7 can sort the values of columns, but i don't think it will apply
in your case.

Cheers
Aaron   

On 6 Oct 2010, at 20:58, "cbertu81@libero.it" <cbertu81@libero.it> wrote:

> Aaron,
> 
> first of all thanks for your time.
> 
> 
> 1. You cannot return just the super columns, you have to get their sub columns as well.
The returned data is ordered, please provide and example of where it is not. 
> 
> I don't know what I did before but now I checked and data are sorted as I expected them
to be :-o. 
> I know I can't get a SC without their sub columns and this is ok. 
> 
> 2. Pull back the entire row and filter/sort the columns client side. It's not possible
to return columns of the same name from different super columns (I think that's what you are
asking). Let me know if you think you have too much data per row to do that. 
> 
> Probably I explained myself wrong. What I want is to get the entire ROW back but already
ordered on the base of a specific column key and not on the base of the SCKey ... example
> 
> UID (ROW) {
>     Company0 { name: zaz, address: street x, phone: 123, other cols }
>     Company1 { name: abacus, address: street y, phone: 234, other cols }
>     Company2 { name: more, address: street x, phone: 345, other cols }
> }
> 
> What I want is to get all the data back from cassandra sorted by the name of the company,
and not of the SC  ...
> 
> UID (ROW) {
>     Company1 { name: abacus, address: street y, phone: 234, other cols }
>     Company2 { name: more, address: street x, phone: 345, other cols }
>     Company0 { name: zaz, address: street x, phone: 123, other cols }
> }
> 
> As far as I know Cassandra I don't think it's possible since I cannot be sure that each
SC contains the specific Column (name), right?
> Is the only way to sort them on client-side?
> 
> Best Regards
> 
> 
> 

Mime
View raw message