Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以在索引列上使用条件时执行 MultigetSliceQuery,例如 IndexedSlicesQuery。换句话说,IndexedSlicesQuery 在一组特定的键上执行。
我发现这样做的方法是首先对一组键执行 MultigetSliceQuery,然后在应用程序代码中过滤结果。但是卡桑德拉可以为我做吗?
不,IndexedSlicesQuery 的唯一选项是设置startKey和rowCount,因此 2 阶段过滤器将是唯一的方法。
有几个选项可供查看:添加另一个二级索引并将其包含在索引查询中,使用现有列族中的复合键和/或列,或者具有引用原始键的键或列的新列族。
结果可能不止一个查询(针对一个或多个列族),但 Cassandra 将承担繁重的工作。