cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lu, Boying" <>
Subject How to use CompositeRangeBuilder to query multiple components in a column?
Date Sun, 09 Mar 2014 15:23:28 GMT
Hi, experts,

I need to query all columns of a row in a column family that meet some conditions (see below).
 The column is composite column and has following format:
<component1><component2><compoment3>... where componentN has String type.

What I want to do is to find out all columns that meet following conditions:

1.       component1 == prefix

2.       value1 <= component2 <= value2

3.       value3 <= component3 <= value4

I want to use
  CompositeRangeBuilder.withPrefix(prefix)  // to match component 1
                                                   .lessThenEquals(value2)  // to filter out
                                                   .lessThenEquals(value4)  // to filter out

But I can only use greaterThenEquals() and lessThanEquals() once because the nextComponent()
is not accessible.
Is there any solution to allow me to do such query?

Thanks a lot


View raw message