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 CF88AC09B for ; Sun, 3 Nov 2013 18:26:53 +0000 (UTC) Received: (qmail 84991 invoked by uid 500); 3 Nov 2013 18:26:51 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 84933 invoked by uid 500); 3 Nov 2013 18:26:50 -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 84924 invoked by uid 99); 3 Nov 2013 18:26:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Nov 2013 18:26:50 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of comptechgeeky@gmail.com designates 74.125.82.177 as permitted sender) Received: from [74.125.82.177] (HELO mail-we0-f177.google.com) (74.125.82.177) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Nov 2013 18:26:45 +0000 Received: by mail-we0-f177.google.com with SMTP id x55so1280586wes.36 for ; Sun, 03 Nov 2013 10:26:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=ABufZ8g/v0SIZH7PItW3gau7LQNEYnSevOymZpHta5A=; b=vYzbScWzn9nfWJdLrjlPm+XlnKw6F16i+IjA56pW9EZ+EfC/gDPX4PZUxwkASdQ88B czNP3ty7kL2h5D41De6JeaZoDqBwRPM0Sr8xdh4kqC7dlZ6J9mt66WR9CcnmsAH4c1Ni rB6vmE9Ric4q/18qeKCdgeP6MvSlWRp6Nc+MRvIQlltKdpHkxjzhYNjN5fOZ4SocDRPP tIcqOGHVy48QvzzJPO8gsq0eZ7IGdUT6xuuNkVffL6mqzah6RpG1+aXuRCdsVMxdIQZP V4fbBK6qFqLJhLNBQcmkn91WTdS2L0xZ+Rx/z3PaCFZ4jsldA+bqqkeX02/FNJCzevkW vQPQ== X-Received: by 10.194.11.38 with SMTP id n6mr10124422wjb.25.1383503183992; Sun, 03 Nov 2013 10:26:23 -0800 (PST) MIME-Version: 1.0 Received: by 10.180.8.100 with HTTP; Sun, 3 Nov 2013 10:26:03 -0800 (PST) From: Techy Teck Date: Sun, 3 Nov 2013 10:26:03 -0800 Message-ID: Subject: Bad Request: No indexed columns present in by-columns clause with Equal operator? To: user Content-Type: multipart/alternative; boundary=047d7b5d5710d3db0204ea49ef96 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b5d5710d3db0204ea49ef96 Content-Type: text/plain; charset=ISO-8859-1 I have below table in CQL- create table test ( employee_id text, employee_name text, value text, last_modified_date timeuuid, primary key (employee_id) ); I inserted couple of records in the above table like this which I will be inserting in our actual use case scenario as well- insert into test (employee_id, employee_name, value, last_modified_date) values ('1', 'e27', 'some_value', now()); insert into test (employee_id, employee_name, value, last_modified_date) values ('2', 'e27', 'some_new_value', now()); insert into test (employee_id, employee_name, value, last_modified_date) values ('3', 'e27', 'some_again_value', now()); insert into test (employee_id, employee_name, value, last_modified_date) values ('4', 'e28', 'some_values', now()); insert into test (employee_id, employee_name, value, last_modified_date) values ('5', 'e28', 'some_new_values', now()); Now I was doing select query for - give me all the employee_id for employee_name `e27`. select employee_id from test where employee_name = 'e27'; And this is the error I am getting - Bad Request: No indexed columns present in by-columns clause with Equal operator Perhaps you meant to use CQL 2? Try using the -2 option when starting cqlsh. Is there anything wrong I am doing here? My use cases are in general - 1. Give me everything for any of the employee_name? 2. Give me everything for what has changed in last 5 minutes? 3. Give me the latest employee_id for any of the employee_name? I am running Cassandra 1.2.11 --047d7b5d5710d3db0204ea49ef96 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I have below table in CQL-

create table test (
= =A0=A0=A0 employee_id text,
=A0=A0=A0 employee_name text,
=A0=A0=A0 v= alue text,
=A0=A0=A0 last_modified_date timeuuid,
=A0=A0=A0 primary k= ey (employee_id)
=A0=A0 );
=A0=A0
=A0=A0
I inserted couple of records in the above table like this which = I will be inserting in our actual use case scenario as well-

=A0=A0= =A0 insert into test (employee_id, employee_name, value, last_modified_date= ) values ('1', 'e27',=A0 'some_value', now());
=A0=A0=A0 insert into test (employee_id, employee_name, value, last_modifie= d_date) values ('2', 'e27',=A0 'some_new_value', no= w());
=A0=A0=A0 insert into test (employee_id, employee_name, value, las= t_modified_date) values ('3', 'e27',=A0 'some_again_val= ue', now());
=A0=A0=A0 insert into test (employee_id, employee_name, value, last_modifie= d_date) values ('4', 'e28',=A0 'some_values', now()= );
=A0=A0=A0 insert into test (employee_id, employee_name, value, last_m= odified_date) values ('5', 'e28',=A0 'some_new_values&#= 39;, now());

=A0=A0=A0
=A0=A0=A0
Now I was doing select query for -=A0 give = me all the employee_id for employee_name `e27`.

=A0=A0=A0 select emp= loyee_id from test where employee_name =3D 'e27';
=A0=A0=A0
= And this is the error I am getting -

=A0=A0=A0 Bad Request: No indexed columns present in by-columns clause = with Equal operator
=A0=A0=A0 Perhaps you meant to use CQL 2? Try using = the -2 option when starting cqlsh.

=A0=A0
Is there anything wron= g I am doing here?

My use cases are in general -

=A01. Give me everything for any = of the employee_name?
=A02. Give me everything for what has changed in = last 5 minutes?
=A03. Give me the latest employee_id for any of the emp= loyee_name?

I am running Cassandra 1.2.11

--047d7b5d5710d3db0204ea49ef96--