From user-return-27317-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Sun Jul 1 18:08:30 2012 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 037F9C48B for ; Sun, 1 Jul 2012 18:08:30 +0000 (UTC) Received: (qmail 67216 invoked by uid 500); 1 Jul 2012 18:08:27 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 67189 invoked by uid 500); 1 Jul 2012 18:08:27 -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 67181 invoked by uid 99); 1 Jul 2012 18:08:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Jul 2012 18:08:27 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a42.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Jul 2012 18:08:19 +0000 Received: from homiemail-a42.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a42.g.dreamhost.com (Postfix) with ESMTP id 435C668C05D for ; Sun, 1 Jul 2012 11:07:58 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; q=dns; s=thelastpickle.com; b=e5n+y6G4p+ s5UzzY4kn+PW3gNUsi7OxRwis44kwIWzg0qlGn3Sm9sovWSj3gvgdJhuwdMa/Uc6 D9503SyX8Pzjbc4InRlwN2bG3cQlM9nVEXzJ8pP8V9YkRaT7pyM+grFsAjf+Aq+6 nnvoUIQVVVqbxkcP6afD0cSvObIjHKzIE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; s=thelastpickle.com; bh=FASXYALzjwFq3cY1 zcZTzUNO2us=; b=fIxlWP4KAABo9/fbxZpCjIlVo0VoGfcRDjyv1KrfSN77q1Do w5oibTY0GY0I7sCdMP81mUUXWmp90DT1rSNhk7h6UZoa/RA9TjFcvV/eM4cMyiJH 6ZY+IYPu1c5SuD+ju0mtcc7gkNL/9IlCxHKPkF2gwwy4lEWkCzCtidt9Q2M= Received: from [172.16.1.4] (unknown [203.86.207.101]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a42.g.dreamhost.com (Postfix) with ESMTPSA id B471968C05B for ; Sun, 1 Jul 2012 11:07:57 -0700 (PDT) From: aaron morton Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: multipart/alternative; boundary="Apple-Mail=_77B051CB-115B-48EE-AEF8-43DF55088134" Subject: Re: No indexed columns present in by-columns clause with "equals" operator Date: Mon, 2 Jul 2012 06:07:57 +1200 In-Reply-To: To: user@cassandra.apache.org References: Message-Id: X-Mailer: Apple Mail (2.1278) --Apple-Mail=_77B051CB-115B-48EE-AEF8-43DF55088134 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Like the exception says: > Bad Request: No indexed columns present in by-columns clause with = "equals" operator > Same with other relational operators(<,>=3D,<=3D) You must include an equality operator in the where clause: That is why > SELECT * FROM STEST WHERE VALUE1 =3D 10;=20 Works but=20 > SELECT * FROM STEST WHERE VALUE1 > 10;=20 does not.=20 Cheers ----------------- Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 28/06/2012, at 8:55 PM, Abhijit Chanda wrote: > Hi All, > I have got a strange exception while using cassandra cql. Relational = operators like (<, >, >=3D, <=3D) are not working. > my columnfamily looks like this. > CREATE COLUMNFAMILY STEST ( > ROW_KEY text PRIMARY KEY, > VALUE1 text, > VALUE2 text > ) WITH > comment=3D'' AND > comparator=3Dtext AND > read_repair_chance=3D0.100000 AND > gc_grace_seconds=3D864000 AND > default_validation=3Dtext AND > min_compaction_threshold=3D4 AND > max_compaction_threshold=3D32 AND > replicate_on_write=3DTrue; >=20 > CREATE INDEX VALUE1_IDX ON STEST (VALUE1); >=20 > CREATE INDEX VALUE2_IDX ON STEST (VALUE2); >=20 >=20 > Now in this columnfamily if i query this=20 > SELECT * FROM STEST WHERE VALUE1 =3D 10; it returns -----> > ROW_KEY | VALUE1 | VALUE2 > ---------+-------------+------------ > 2 | 10 | AB >=20 > But if i query like this=20 > SELECT * FROM STEST WHERE VALUE1 > 10;=20 > It is showing this exception > Bad Request: No indexed columns present in by-columns clause with = "equals" operator > Same with other relational operators(<,>=3D,<=3D) >=20 > these are the datas available in my columnfamily=20 > ROW_KEY | VALUE1 | VALUE2 > ----------------+--------------+-------- > 3 | 100 | ABC > 5 | 9 | ABCDE > 2 | 10 | AB > 1 | 1 | A > 4 | 19 | ABCD >=20 > Looks like some configuration problem. Please help me. Thanks in = Advance >=20 >=20 >=20 >=20 > Regards, > --=20 > Abhijit Chanda > Analyst > VeHere Interactive Pvt. Ltd. > +91-9748888395 >=20 --Apple-Mail=_77B051CB-115B-48EE-AEF8-43DF55088134 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 Like = the exception says:

Bad = Request: No indexed columns present in by-columns clause with "equals" = operator
Same with other relational = operators(<,>=3D,<=3D)
You must include an equality = operator in the where clause:

That is = why
SELECT * FROM STEST WHERE VALUE1 = =3D 10; 

Works = but 
SELECT * FROM STEST WHERE = VALUE1 > 10; 
does = not. 

Cheers

http://www.thelastpickle.com

On 28/06/2012, at 8:55 PM, Abhijit Chanda wrote:

Hi = All,
I have got a strange exception while using cassandra cql. = Relational operators like (<, >, >=3D, <=3D) are not = working.
my columnfamily looks like this.
CREATE COLUMNFAMILY = STEST (
  ROW_KEY text PRIMARY KEY,
  VALUE1 text,
  VALUE2 text
) WITH
  comment=3D''= AND
  comparator=3Dtext AND
  = read_repair_chance=3D0.100000 AND
  gc_grace_seconds=3D864000 = AND
  default_validation=3Dtext AND
  = min_compaction_threshold=3D4 AND
  max_compaction_threshold=3D32 AND
  = replicate_on_write=3DTrue;

CREATE INDEX VALUE1_IDX ON STEST = (VALUE1);

CREATE INDEX VALUE2_IDX ON STEST = (VALUE2);


Now in this columnfamily if i query this
SELECT = * FROM STEST WHERE VALUE1 =3D 10; it returns ----->
 ROW_KEY | VALUE1 | = VALUE2
         = ---------+-------------+------------
     &nbs= p;          2 |   =       10 |     = AB

But if i query like this
SELECT * FROM STEST WHERE VALUE1 = > 10;
It is showing this exception
Bad Request: No indexed columns present in by-columns clause with = "equals" operator
Same with other relational = operators(<,>=3D,<=3D)

these are  the datas = available in my columnfamily
ROW_KEY | VALUE1 | VALUE2
= ----------------+--------------+--------
     =          3 |     =     100 |    ABC
     =          5 |       =      9 |  = ABCDE
           = ;   2 |          10 = |     = AB
           &n= bsp;  1 |            1 = |      = A
           &nb= sp;  4 |          19 = |   ABCD

Looks like some configuration problem. Please help me. Thanks in = Advance




Regards,
--
Abhijit = Chanda
Analyst
VeHere Interactive Pvt. = Ltd.
+91-9748888395


= --Apple-Mail=_77B051CB-115B-48EE-AEF8-43DF55088134--