On Sun, Jul 29, 2012 at 9:30 AM, Abhijit Chanda
<abhijit.chan...@gmail.com> wrote:
> There should be at least one "=" (equals) in the WHERE case on key or
> secondary index column, this is the Cassandra limitation.

Yep, it's still there (see validateFilterClauses from line 531):

https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/thrift/ThriftValidation.java

It's not probably going to change anytime soon (or later, probably ;-)
), secondary indexes are still CFs underneath:

http://grokbase.com/t/cassandra/user/1099pty59r/indexoperator-lt-lte-gt-gte-implementation#20100910dx1fwm8z9ek1cvec10jvmpzfa4

>From that message you also get an hint on how to proceed in this situation:
1) Add a "fake" equality condition to the query;
2) Go for a range scan, which is more efficient than the hack above.

Depending on the speed than you need on the writing side compared to
the speed required on the reading side, you might also consider
keeping an ad-hoc index of the counter columns with the counter
greater than your threshold, but it's surely requiring more
housekeeping on your side.

Paolo

Reply via email to