On Jan 18, 2011, at 12:02, Aaron Morton wrote:

> Does wrapping foo in single quotes help?

No.

> Also, does this help 
> http://www.datastax.com/blog/whats-new-cassandra-07-secondary-indexes

Actually this doesn't even compile because addGtExpression expects a String 
type (?!).

StringSerializer ss = StringSerializer.get();
IndexedSlicesQuery<String, String, String> indexedSlicesQuery = 
HFactory.createIndexedSlicesQuery(keyspace, ss, ss, ss);
indexedSlicesQuery.setColumnNames("full_name", "birth_date", "state");
indexedSlicesQuery.addGtExpression("birth_date", 1970L);
indexedSlicesQuery.addEqualsExpression("state", "UT");
indexedSlicesQuery.setColumnFamily("users");
indexedSlicesQuery.setStartKey("");
QueryResult<OrderedRows<String, String, String>> result = 
indexedSlicesQuery.execute();

> Aaron
> 
> On 18/01/2011, at 11:54 PM, Timo Nentwig <[email protected]> wrote:
> 
>> I put a secondary index on rc (IntegerType) and user_agent (AsciiType).
>> 
>> Don't understand this bevahiour at all, can somebody explain?
>> 
>> [default@tracking] get crawler where user_agent=foo and rc=200;
>> 
>> 0 Row Returned.
>> [default@tracking] get crawler where rc=200 and user_agent=foo;           
>> -------------------
>> RowKey: -??>2
>> => (column=rc, value=200, timestamp=1295347760933000)
>> => (column=url, value=http://www/0, timestamp=1295347760933000)
>> => (column=user_agent, value=foo, timestamp=1295347760915000)
>> 
>> 1 Row Returned.
>> [default@tracking] get crawler where rc>199 and user_agent=foo;
>> 
>> 0 Row Returned.
>> [default@tracking] get crawler where user_agent=foo; 
>> -------------------
>> RowKey: -??>7
>> => (column=rc, value=207, timestamp=1295347760935000)
>> => (column=url, value=http://www/8, timestamp=1295347760933000)
>> => (column=user_agent, value=foo, timestamp=1295347760917000)
>> -------------------
>> RowKey: -??>8
>> => (column=rc, value=209, timestamp=1295347760935000)
>> => (column=url, value=http://www/9, timestamp=1295347760933000)
>> => (column=user_agent, value=foo, timestamp=1295347760916000)
>> -------------------
>> RowKey: -??>5
>> => (column=rc, value=201, timestamp=1295347760937000)
>> => (column=url, value=http://www/2, timestamp=1295347760933000)
>> => (column=user_agent, value=foo, timestamp=1295347760916000)
>> -------------------
>> RowKey: -??>6
>> => (column=rc, value=205, timestamp=1295347760935000)
>> => (column=url, value=http://www/5, timestamp=1295347760933000)
>> => (column=user_agent, value=foo, timestamp=1295347760917000)
>> -------------------
>> RowKey: -??>2
>> => (column=rc, value=200, timestamp=1295347760933000)
>> => (column=url, value=http://www/0, timestamp=1295347760933000)
>> => (column=user_agent, value=foo, timestamp=1295347760915000)
>> 
>> 5 Rows Returned.
>> 

Reply via email to