cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raoyixuan (Shandy)" <>
Subject indexedslicesQuery class error
Date Thu, 17 Feb 2011 02:29:59 GMT
I do the range query  by the hector client when the state and birht_date columns are both indexed,
it show the error:

The method addGtExpression(String,String) in the type IndexedSlicesQuery<String,String,String>
is not applicable for the arguments(String,long)

The code is as below:

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");
QueryResult<OrderedRows<String, String, String>> result = indexedSlicesQuery.execute();

华为技术有限公司 Huawei Technologies Co., Ltd.[Company_logo]

地址:深圳市龙岗区坂田华为基地 邮编:518129
Huawei Technologies Co., Ltd.
Bantian, Longgang District,Shenzhen 518129, P.R.China
This e-mail and its attachments contain confidential information from HUAWEI, which
is intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
phone or email immediately and delete it!

View raw message