You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Rishabh Agrawal <ri...@impetus.co.in> on 2013/02/11 07:36:08 UTC
Querying composite keys
Hello
I have key and columns defined in following fashion:
HotelName1:RoomNum1
HotelName2:RoomNum2
HotelName3:RoomNum3
Key1:TimeStamp:VersionNum
Is there a way that I can query this schema by only 'key' or 'HotelName' i.e. querying using a part of composite key and not the full key.
Thanks and Regards
Rishabh Agrawal
________________________________
NOTE: This message may contain information that is confidential, proprietary, privileged or otherwise protected by law. The message is intended solely for the named addressee. If received in error, please destroy and notify the sender. Any use of this email is prohibited when received in error. Impetus does not represent, warrant and/or guarantee, that the integrity of this communication has been maintained nor that the communication is free of errors, virus, interception or interference.
Re: Querying composite keys
Posted by Vivek Mishra <mi...@gmail.com>.
You can query over composite columns as:
1) Partition key
2) First part of clustered key(using EQ ops).
Secondary indexes over non composite columns are not possible.
-Vivek
On Mon, Feb 11, 2013 at 12:06 PM, Rishabh Agrawal <
rishabh.agrawal@impetus.co.in> wrote:
> Hello
>
>
>
> I have key and columns defined in following fashion:
>
>
>
>
>
> HotelName1:RoomNum1
>
> HotelName2:RoomNum2
>
> HotelName3:RoomNum3
>
> Key1:TimeStamp:VersionNum
>
>
>
>
>
>
>
>
>
>
>
> Is there a way that I can query this schema by only ‘key’ or ‘HotelName’
> i.e. querying using a part of composite key and not the full key.
>
>
>
>
>
> Thanks and Regards
>
> Rishabh Agrawal
>
>
>
> ------------------------------
>
>
>
>
>
>
> NOTE: This message may contain information that is confidential,
> proprietary, privileged or otherwise protected by law. The message is
> intended solely for the named addressee. If received in error, please
> destroy and notify the sender. Any use of this email is prohibited when
> received in error. Impetus does not represent, warrant and/or guarantee,
> that the integrity of this communication has been maintained nor that the
> communication is free of errors, virus, interception or interference.
>