Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 82668 invoked from network); 18 Feb 2011 12:47:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Feb 2011 12:47:32 -0000 Received: (qmail 34837 invoked by uid 500); 18 Feb 2011 12:47:30 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 34618 invoked by uid 500); 18 Feb 2011 12:47:26 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 34610 invoked by uid 99); 18 Feb 2011 12:47:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Feb 2011 12:47:25 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.210.172] (HELO mail-iy0-f172.google.com) (209.85.210.172) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Feb 2011 12:47:18 +0000 Received: by iym1 with SMTP id 1so3715512iym.31 for ; Fri, 18 Feb 2011 04:46:57 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.207.71 with SMTP id fx7mr470537ibb.127.1298033217197; Fri, 18 Feb 2011 04:46:57 -0800 (PST) Received: by 10.231.54.88 with HTTP; Fri, 18 Feb 2011 04:46:57 -0800 (PST) Date: Fri, 18 Feb 2011 18:46:57 +0600 Message-ID: Subject: Queries on secondary indexes From: Rauan Maemirov To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=90e6ba53a4a8d1563f049c8de8fc --90e6ba53a4a8d1563f049c8de8fc Content-Type: text/plain; charset=ISO-8859-1 With this schema: create column family Userstream with comparator=UTF8Type and rows_cached = 10000 and keys_cached = 100000 and column_metadata=[{column_name:account_id, validation_class:IntegerType, index_type: 0, index_name:UserstreamAccountidIdx}, {column_name:from_id, validation_class:IntegerType, index_type: 0, index_name:UserstreamFromidIdx}, {column_name:type, validation_class:IntegerType, index_type: 0, index_name:UserstreamTypeIdx}]; I'm having this: [default@Keyspace1] get Userstream where from_id=5 and type<4; ------------------- RowKey: 23:feed:12980301937245 => (column=account_id, value=23, timestamp=1298031252270173) => (column=activities, value=5b2232313864333936302d336235362d313165302d393838302d666235613434333135343865225d, timestamp=1298031252270173) => (column=from_id, value=5, timestamp=1298031252270173) => (column=type, value=5, timestamp=1298031252270173) ------------------- RowKey: 5:feed:12980301937196 => (column=account_id, value=5, timestamp=1298031252270173) => (column=activities, value=5b2232313863376339302d336235362d313165302d623536342d666235303739333835303234225d, timestamp=1298031252270173) => (column=from_id, value=5, timestamp=1298031252270173) => (column=type, value=5, timestamp=1298031252270173) ------------------- RowKey: 9:feed:12980301937207 => (column=account_id, value=9, timestamp=1298031252270173) => (column=activities, value=5b2232313863613637302d336235362d313165302d393333622d373530393638613764326561225d, timestamp=1298031252270173) => (column=from_id, value=5, timestamp=1298031252270173) => (column=type, value=0, timestamp=1298031252270173) 3 Rows Returned. and [default@Keyspace1] get Userstream where from_id=5 and type=5; 0 Row Returned. What's wrong with it? --90e6ba53a4a8d1563f049c8de8fc Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable With this schema:

create column family Userstream w= ith comparator=3DUTF8Type and rows_cached =3D 10000 and keys_cached =3D 100= 000
and column_metadata=3D[{column_name:account_id, validation_class:Intege= rType, index_type: 0, index_name:UserstreamAccountidIdx},
{col= umn_name:from_id, validation_class:IntegerType, index_type: 0, index_name:U= serstreamFromidIdx},
{column_name:type, validation_class:IntegerType, inde= x_type: 0, index_name:UserstreamTypeIdx}];

I'm having this:

[default@Keyspace1] get Userstream where from_id=3D5 and type<4;
=
-------------------
RowKey: 23:feed:12980301937245
=3D> (column=3Daccount_id, value=3D23, timestamp=3D1298031252270173)
=3D> (column=3Dactivities, value=3D5b2232313864333936302d33623536= 2d313165302d393838302d666235613434333135343865225d, timestamp=3D12980312522= 70173)
=3D> (column=3Dfrom_id, value=3D5, timestamp=3D1298031252270173)
=3D> (column=3Dtype, value=3D5, timestamp=3D1298031252270173)
-------------------
RowKey: 5:feed:12980301937196
=3D> (column=3Daccount_id, value=3D5, timestamp=3D1298031252270173)
=3D> (column=3Dactivities, value=3D5b2232313863376339302d336235362d= 313165302d623536342d666235303739333835303234225d, timestamp=3D1298031252270= 173)
=3D> (column=3Dfrom_id, value=3D5, timestamp=3D1298031252= 270173)
=3D> (column=3Dtype, value=3D5, timestamp=3D1298031252270173)
=
-------------------
RowKey: 9:feed:12980301937207
= =3D> (column=3Daccount_id, value=3D9, timestamp=3D1298031252270173)
=3D> (column=3Dactivities, value=3D5b2232313863613637302d336235362= d313165302d393333622d373530393638613764326561225d, timestamp=3D129803125227= 0173)
=3D> (column=3Dfrom_id, value=3D5, timestamp=3D1298031252270173)
=3D> (column=3Dtype, value=3D0, timestamp=3D1298031252270173)

3 Rows Returned.


=
and

[default@Keyspace1] get Userstream where from_id= =3D5 and type=3D5;

0 Row Returned.



What's wrong with it? --90e6ba53a4a8d1563f049c8de8fc--