Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B223F9AFA for ; Thu, 19 Jan 2012 11:18:52 +0000 (UTC) Received: (qmail 57314 invoked by uid 500); 19 Jan 2012 11:18:50 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 57193 invoked by uid 500); 19 Jan 2012 11:18:49 -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 57185 invoked by uid 99); 19 Jan 2012 11:18:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jan 2012 11:18:49 +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 [207.97.245.121] (HELO smtp121.iad.emailsrvr.com) (207.97.245.121) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jan 2012 11:18:44 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp42.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id BB6FE14875E for ; Thu, 19 Jan 2012 06:18:22 -0500 (EST) X-Virus-Scanned: OK Received: from dynamic1.wm-web.iad.mlsrvr.com (dynamic1.wm-web.iad1a.rsapps.net [192.168.2.150]) by smtp42.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id A9D89148754 for ; Thu, 19 Jan 2012 06:18:22 -0500 (EST) Received: from geodesiconline.com (localhost [127.0.0.1]) by dynamic1.wm-web.iad.mlsrvr.com (Postfix) with ESMTP id 94AF7C98070 for ; Thu, 19 Jan 2012 06:18:22 -0500 (EST) Received: by webmail.geodesiconline.com (Authenticated sender: vaibhav.s@geodesiconline.com, from: vaibhav.s@geodesiconline.com) with HTTP; Thu, 19 Jan 2012 16:48:22 +0530 (IST) Date: Thu, 19 Jan 2012 16:48:22 +0530 (IST) Subject: CQL 'Where' clause ignores secondary index filter From: vaibhav.s@geodesiconline.com To: user@cassandra.apache.org MIME-Version: 1.0 Content-Type: multipart/alternative;boundary="----=_20120119164822000000_13410" Importance: Normal X-Priority: 3 (Normal) X-Type: html Message-ID: <1326971902.607524863@webmail.geodesiconline.com> X-Mailer: webmail7.0 ------=_20120119164822000000_13410 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =0AHi,=0A =0AI've defined a column family 'Vaibhav' in which every row has= few columns and its values. I've declared two column as secondary index so= that I can filter the rows on the basis of those column values.=0A =0ANow = whenever I execute a CQL with either only rowkey or column name in 'WHERE' = clause, it gives me the proper result. But when I use both rowkey and colum= n name filter in 'WHERE' clause it ignores the column filter and gives the = result matching with the rowkey.=0A =0ASample Records from column family 'V= aibhav':=0A=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A =0A =0ARowKey: 1111 =0A=0A=3D= > (column=3DBare_JID, value=3Dmithun@geo.com, timestamp=3D1326436553009) = =0A=3D> (column=3DDomain, value=3Dgeo.com, timestamp=3D1326436553014) =0A= =3D> (column=3DFull_JID, value=3Dmithun@geo.com/android, timestamp=3D132643= 6552979) =0A------------------- =0ARowKey: 2222=0A=3D> (column=3DBare_JID, = value=3Dvenkat@geo.com, timestamp=3D1326436611316)=0A=3D> (column=3DDomain,= value=3Dgeo.com, timestamp=3D1326436611318)=0A=3D> (column=3DFull_JID, val= ue=3Dvenkat@geo.com/android, timestamp=3D1326436611310)=0A-----------------= --=0ARowKey: 3333=0A=3D> (column=3DBare_JID, value=3Dkondiram@geo.com, time= stamp=3D1326436643841)=0A=3D> (column=3DDomain, value=3Dgeo.com, timestamp= =3D1326436643842)=0A=3D> (column=3DFull_JID, value=3Dkondiram@geo.com/andro= id, timestamp=3D1326436643835)=0A =0A =0AHere both 'Bare_JID' and 'Domain' = have secondary Index. =0A =0ACQL : SELECT * from Vaibhav where KEY =3D '111= 1' AND Bare_JID=3D'venkat@geo.com' =0A =0Ais returning the first row, but i= deally it should return no records as both the condition are not satisfied.= =0A =0A =0AKindly help me to resolve this issue.=0A =0ARegards,=0AVaibhav S= . ------=_20120119164822000000_13410 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Hi,

=0A

 

=0A

I've defined a  column family 'Va= ibhav' in which every row has few columns and its values. I've declared two= column as secondary index so that I can filter the rows on the basis of th= ose column values.

=0A

 

=0A

Now whenever I execute a CQL with either only row= key or column name in 'WHERE' clause, it gives me the proper result. But wh= en I use both rowkey and column name filter in 'WHERE' clause it ignores th= e column filter and gives the result matching with the rowkey.

=0A

 

= =0A

Sam= ple Records from column family 'Vaibhav':

=0A

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A

&n= bsp;

=0A

 

=0A

RowKey: 1111

=0A=0A

=3D> (column=3DBare_JID, va= lue=3Dmithun@geo.com, timestamp=3D1326436553009)

=0A

= =3D> (column=3DDomain, value=3Dgeo.com, timestamp=3D1326436553014)

=0A

=3D> (column=3DFull_JID, value=3Dmithun@geo.com/andr= oid, timestamp=3D1326436552979)

=0A

-----------------= --

=0A

RowKey: 2222

=0A

=3D> (c= olumn=3DBare_JID, value=3Dvenkat@geo.com, timestamp=3D1326436611316)=

=0A

=3D> (column=3DDomain, value=3Dgeo.com, timestamp=3D13= 26436611318)

=0A

=3D> (column=3DFull_JID, value=3Dve= nkat@geo.com/android, timestamp=3D1326436611310)

=0A

-= ------------------

=0A

RowKey: 3333

=0A

=3D> (column=3DBare_JID, value=3Dkondiram@geo.com, timestamp=3D1326= 436643841)

=0A

=3D> (column=3DDomain, value=3Dgeo.co= m, timestamp=3D1326436643842)

=0A

=3D> (column=3DFul= l_JID, value=3Dkondiram@geo.com/android, timestamp=3D1326436643835)<= /p>=0A

 

=0A

 

=0A

Here both 'Bare_JID' and 'Domain' have se= condary Index.

=0A

 

=0A=

CQL : SELECT * from Vaibhav where KEY =3D '1111' AND Bare_= JID=3D'venkat@geo.com'

=0A

 = ;

=0A

is returning the first row, but ideally it should retur= n no records as both the condition are not satisfied.

=0A

 

=0A

&nbs= p;

=0A

Kindly help me to resolve this issue.

=0A

 

=0A

= Regards,

=0A=

Vaibhav S.

=0A

------=_20120119164822000000_13410--