From user-return-33891-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Fri May 3 13:24:17 2013 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 D50FF10C02 for ; Fri, 3 May 2013 13:24:17 +0000 (UTC) Received: (qmail 20476 invoked by uid 500); 3 May 2013 13:24:14 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 20041 invoked by uid 500); 3 May 2013 13:24:10 -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 20009 invoked by uid 99); 3 May 2013 13:24:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 May 2013 13:24:09 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE X-Spam-Check-By: apache.org Received-SPF: error (athena.apache.org: local policy) Received: from [108.166.43.81] (HELO smtp81.ord1c.emailsrvr.com) (108.166.43.81) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 May 2013 13:24:03 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp3.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id BD4B6500EB for ; Fri, 3 May 2013 09:23:22 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp3.relay.ord1c.emailsrvr.com (Authenticated sender: himanshu.joshi-AT-orkash.com) with ESMTPSA id DCC0250097 for ; Fri, 3 May 2013 09:23:21 -0400 (EDT) Message-ID: <5183B9FD.8010808@orkash.com> Date: Fri, 03 May 2013 18:52:05 +0530 From: "himanshu.joshi" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 MIME-Version: 1.0 To: user@cassandra.apache.org Subject: Error on Range queries Content-Type: multipart/alternative; boundary="------------070209010104080505010906" X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------070209010104080505010906 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, I have created a 2 node test cluster in Cassandra version 1.2.3 with Simple Strategy, Replication Factor 2 and ByteOrderedPartitioner(so as to get Range Query functionality). When i am using a range query on a secondary index in CQLSH, I am getting the error : "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." My query is: select * from temp where min_update >10 limit 5; My table structure is: CREATE TABLE temp ( id bigint PRIMARY KEY, archive_name text, country_name text, description text, dt_stamp timestamp, location_id bigint, max_update bigint, min_update bigint ) WITH COMPACT STORAGE AND bloom_filter_fp_chance=0.010000 AND caching='KEYS_ONLY' AND comment='' AND dclocal_read_repair_chance=0.000000 AND gc_grace_seconds=864000 AND read_repair_chance=0.100000 AND replicate_on_write='true' AND populate_io_cache_on_flush='false' AND compaction={'class': 'SizeTieredCompactionStrategy'} AND compression={'sstable_compression': 'SnappyCompressor'}; CREATE INDEX temp_min_update_idx ON temp (min_update); Range queries are working fine on primary key. I am getting the same error on another query of an another table temp2: select * from temp2 where reffering_url='Some URL'; this table is also having the secondary index on this field("reffering_url") Any help would be appreciated. -- Thanks & Regards, Himanshu Joshi --------------070209010104080505010906 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi,

    I have created a 2 node test cluster in Cassandra version 1.2.3 with  Simple Strategy, Replication Factor 2 and ByteOrderedPartitioner(so as to get Range Query functionality).

When i am using a range query on a secondary index in CQLSH,  I am getting the error :

"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."

My query is: select * from temp where min_update >10 limit 5;



My table structure is:

CREATE TABLE temp (
  id bigint PRIMARY KEY,
  archive_name text,
  country_name text,
  description text,
  dt_stamp timestamp,
  location_id bigint,
  max_update bigint,
  min_update bigint
) WITH COMPACT STORAGE AND
  bloom_filter_fp_chance=0.010000 AND
  caching='KEYS_ONLY' AND
  comment='' AND
  dclocal_read_repair_chance=0.000000 AND
  gc_grace_seconds=864000 AND
  read_repair_chance=0.100000 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  compaction={'class': 'SizeTieredCompactionStrategy'} AND
  compression={'sstable_compression': 'SnappyCompressor'};

CREATE INDEX temp_min_update_idx ON temp (min_update);


Range queries are working fine on primary key.


I am getting the same error on another query of an another table temp2:

select * from temp2 where reffering_url='Some URL';

this table is also having the secondary index on this field("reffering_url")

Any help would be appreciated.
-- 
Thanks & Regards,
Himanshu Joshi
--------------070209010104080505010906--