On Fri, Oct 8, 2010 at 9:27 AM, Christian Decker <decker.christ...@gmail.com> wrote: > On Thu, Oct 7, 2010 at 6:25 PM, Jonathan Ellis <jbel...@gmail.com> wrote: >> No, LT[E] is not on the roadmap for primary index clauses (GT[E] is, >> for 0.7.1). So you would want to create an index with an inverted >> comparator, to turn LTE into GTE. > > Hm, sounds rather strange, but that would mean that I'd either be able to > select GT[E] or LT[E], not combining both, right? So expressions like 123 < > uid < 321 would be completely impossible.
No, you only need one primary index clause to avoid the full CF scan. After that you can have subordinate clauses on basically anything. so uid > 123 would be the primary and uid < 321 would be subordinate, and that would be fine. (just like now you can have uid=123 and x > foo.) > How would one proceed to create an > index with an inverted comparator? I'd have to create my own Sub-Type on > which I'd invert compare function. Right, although I think this would be common enough that we'd either provide reversed comparators or add a "reversed" option to the index definition. -- Jonathan Ellis Project Chair, Apache Cassandra co-founder of Riptano, the source for professional Cassandra support http://riptano.com