【发布时间】:2014-03-13 09:23:00
【问题描述】:
我在 cassandra 中有这张桌子
CREATE TABLE global_product_highlights (
deal_id text,
product_id text,
highlight_strength double,
category_id text,
creation_date timestamp,
rank int,
PRIMARY KEY (deal_id, product_id, highlight_strength)
)
当我在 Golang 中触发以下查询时
err = session.Query("select product_id from global_product_highlights where category_id=? order by highlight_strength DESC",default_category).Scan(&prodId_array)
我得到 ERROR : ORDER BY with 2ndary index is not supported.
我在 category_id 上有一个索引。
我不完全了解二级索引是如何应用于 cassandra 中的复合键的。
如果有人能解释并纠正这一点,不胜感激。
【问题讨论】: