cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aaron morton <aa...@thelastpickle.com>
Subject Re: No indexed columns present in by-columns clause with "equals" operator
Date Sun, 01 Jul 2012 18:07:57 GMT
Like the exception says:

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

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

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

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 (<,
>, >=, <=) are not working.
> my columnfamily looks like this.
> CREATE COLUMNFAMILY STEST (
>   ROW_KEY text PRIMARY KEY,
>   VALUE1 text,
>   VALUE2 text
> ) WITH
>   comment='' AND
>   comparator=text AND
>   read_repair_chance=0.100000 AND
>   gc_grace_seconds=864000 AND
>   default_validation=text AND
>   min_compaction_threshold=4 AND
>   max_compaction_threshold=32 AND
>   replicate_on_write=True;
> 
> 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 = 10; it returns ----->
>  ROW_KEY | VALUE1 | VALUE2
>          ---------+-------------+------------
>                 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(<,>=,<=)
> 
> these are  the datas available in my columnfamily 
> ROW_KEY | VALUE1 | VALUE2
> ----------------+--------------+--------
>               3 |         100 |    ABC
>               5 |            9 |  ABCDE
>               2 |          10 |     AB
>               1 |            1 |      A
>               4 |          19 |   ABCD
> 
> Looks like some configuration problem. Please help me. Thanks in Advance
> 
> 
> 
> 
> Regards,
> -- 
> Abhijit Chanda
> Analyst
> VeHere Interactive Pvt. Ltd.
> +91-9748888395
> 


Mime
View raw message