Does Cassandra support conditional queries?

I am considering switching to cassandra from my current SQL-esque (simpledb) solution, mainly because of the speed, cost, and cassandra built-in caching feature. However, I was fixated on the idea of ​​indexing. Ive compiled that in cassandra you need to manually create indexes to perform complex queries. But what if you have data like the following: a line with a simple supercolumn:

row1 {value1 = "5", value2 = "7", value3 = "9"}

And you need to execute dynamic queries like "give me all the lines with value1 between x and y and value2 between z and q etc. Is this possible? Or if you have such queries, is it a bad idea to use Cassandra?

+6
cassandra nosql
source share
2 answers

Cassandra 0.7.x contains a secondary index that allows you to make queries like the ones above. The following blog describes the concept: http://www.riptano.com/blog/whats-new-cassandra-07-secondary-indexes

+5
source share

Secondary indices were entered at 0.7. However, to use indexed_slice_query, you must have at least one equality expression. For example, you can do value1 = x and value2 <y, but not both range requests.

See API Cassandra

+2
source share

All Articles