cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject CQL 'Where' clause ignores secondary index filter
Date Thu, 19 Jan 2012 11:18:22 GMT

I've defined a  column family 'Vaibhav' in which every row has few columns and its values.
I've declared two column as secondary index so that I can filter the rows on the basis of
those column values.
Now whenever I execute a CQL with either only rowkey or column name in 'WHERE' clause, it
gives me the proper result. But when I use both rowkey and column name filter in 'WHERE' clause
it ignores the column filter and gives the result matching with the rowkey.
Sample Records from column family 'Vaibhav':
RowKey: 1111 

=> (column=Bare_JID,, timestamp=1326436553009) 
=> (column=Domain,, timestamp=1326436553014) 
=> (column=Full_JID,, timestamp=1326436552979) 
RowKey: 2222
=> (column=Bare_JID,, timestamp=1326436611316)
=> (column=Domain,, timestamp=1326436611318)
=> (column=Full_JID,, timestamp=1326436611310)
RowKey: 3333
=> (column=Bare_JID,, timestamp=1326436643841)
=> (column=Domain,, timestamp=1326436643842)
=> (column=Full_JID,, timestamp=1326436643835)
Here both 'Bare_JID' and 'Domain' have secondary Index. 
CQL : SELECT * from Vaibhav where KEY = '1111' AND Bare_JID='' 
is returning the first row, but ideally it should return no records as both the condition
are not satisfied.
Kindly help me to resolve this issue.
Vaibhav S.
View raw message