You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Maxim Potekhin <po...@bnl.gov> on 2011/12/21 03:04:54 UTC
Can I slice on composite indexes?
Let's say I have rows with composite columns Like
("key1", {('xyz', 'abc'): 'colval1'}, {('xyz', 'def'): 'colval2'})
("key2", {('ble', 'meh'): 'otherval'})
Is it possible to create a composite type index such that I can query on
'xyz'
and get the first two columns?
Thanks
Maxim
Re: Can I slice on composite indexes?
Posted by aaron morton <aa...@thelastpickle.com>.
You can slice the "key1" row to get the columns that have "xyz" as the value for the first component in the column name. Check the docs in your client for how to do that.
Hope that helps.
-----------------
Aaron Morton
Freelance Developer
@aaronmorton
http://www.thelastpickle.com
On 21/12/2011, at 3:04 PM, Maxim Potekhin wrote:
> Let's say I have rows with composite columns Like
>
> ("key1", {('xyz', 'abc'): 'colval1'}, {('xyz', 'def'): 'colval2'})
> ("key2", {('ble', 'meh'): 'otherval'})
>
> Is it possible to create a composite type index such that I can query on 'xyz'
> and get the first two columns?
>
> Thanks
>
> Maxim
>