As designed in all versions. The search queries have to have an indexed
column which is keyed by "=". C* is still a key/value store, so you
have to have a key to get anywhere... Once the "=" is used to pull in
rows, the other parts of the query are then used to filter the results
before they are returned.
On 12/06/2011 02:54 PM, Peter Lin wrote:
I was doing some testing with CQL and noticed something. I'm guessing
it's probably user error on my part, but just in case it isn't.
If I execute a query like this, I get the following error "Caused by:
InvalidRequestException(why:No indexed columns present in by-columns
clause with "equals" operator)"
select * from user_columnfamily where effectiveTime>= 1323203100182
The relevant parts of the exception thrown:
me.prettyprint.hector.api.exceptions.HInvalidRequestException:
InvalidRequestException(why:No indexed columns present in by-columns
clause with "equals" operator)
at
me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(ExceptionsTranslatorImpl.java:50)
at me.prettyprint.cassandra.model.CqlQuery$1.execute(CqlQuery.java:127)
at me.prettyprint.cassandra.model.CqlQuery$1.execute(CqlQuery.java:94)
at
me.prettyprint.cassandra.service.Operation.executeAndSetResult(Operation.java:101)
at
me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:232)
at
me.prettyprint.cassandra.model.ExecutingKeyspace.doExecuteOperation(ExecutingKeyspace.java:97)
at me.prettyprint.cassandra.model.CqlQuery.execute(CqlQuery.java:93)
If I change the query and add another filter with equal operator, it works fine.
select * from user_columnfamily where effectiveTime>= 1323203100182
and firstName = 'bob'
I'm assuming this is "as designed" in 0.8.x release.
thanks
peter