我正在调查 Cassandra,但在以下任何文档中都找不到答案。
我需要在深层层次结构中查询范围。我已经确定表示层次结构的最简单方法是将每个级别作为一列。例如:
Origin Manufacturer Price ID
Europe.Germany VW Group.Audi 20000 1
Europe.Germany VW Group.Porshe 21000 2
Europe.Germany BMW 19000 3
这是一个伪 SQL 示例:
SELECT ID FROM CompositeTable WHERE (Origin STARTS WITH 'Europe')
AND (Manufacturer STARTS WITH 'VW Group' AND IS NOT 'VW Group.Porshe' OR IS 'BMW')
AND (Price BETWEEN 18000 AND 22000)
结果:
ID = [1, 3]
Cassandra 可以跨复合索引执行这种类型的搜索吗?