incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norman Maurer <nor...@apache.org>
Subject Re: Queries on secondary indexes
Date Mon, 21 Feb 2011 13:23:54 GMT
No sure whats your problem..

Use two EQ operations works without a problem here (even via the cli).

Bye,
Norman

2011/2/18 Rauan Maemirov <rauan@maemirov.com>:
> With this schema:
> create column family Userstream with comparator=UTF8Type and rows_cached =
> 10000 and keys_cached = 100000
> and column_metadata=[{column_name:account_id, validation_class:IntegerType,
> index_type: 0, index_name:UserstreamAccountidIdx},
> {column_name:from_id, validation_class:IntegerType, index_type: 0,
> index_name:UserstreamFromidIdx},
> {column_name:type, validation_class:IntegerType, index_type: 0,
> index_name:UserstreamTypeIdx}];
> I'm having this:
> [default@Keyspace1] get Userstream where from_id=5 and type<4;
> -------------------
> RowKey: 23:feed:12980301937245
> => (column=account_id, value=23, timestamp=1298031252270173)
> => (column=activities,
> value=5b2232313864333936302d336235362d313165302d393838302d666235613434333135343865225d,
> timestamp=1298031252270173)
> => (column=from_id, value=5, timestamp=1298031252270173)
> => (column=type, value=5, timestamp=1298031252270173)
> -------------------
> RowKey: 5:feed:12980301937196
> => (column=account_id, value=5, timestamp=1298031252270173)
> => (column=activities,
> value=5b2232313863376339302d336235362d313165302d623536342d666235303739333835303234225d,
> timestamp=1298031252270173)
> => (column=from_id, value=5, timestamp=1298031252270173)
> => (column=type, value=5, timestamp=1298031252270173)
> -------------------
> RowKey: 9:feed:12980301937207
> => (column=account_id, value=9, timestamp=1298031252270173)
> => (column=activities,
> value=5b2232313863613637302d336235362d313165302d393333622d373530393638613764326561225d,
> timestamp=1298031252270173)
> => (column=from_id, value=5, timestamp=1298031252270173)
> => (column=type, value=0, timestamp=1298031252270173)
> 3 Rows Returned.
>
> and
> [default@Keyspace1] get Userstream where from_id=5 and type=5;
> 0 Row Returned.
>
>
> What's wrong with it?

Mime
View raw message