Cassandra allows you to select a range only by:
a) Section key only if ByteOrderPartitioner is used (now default is murmur3).
b) any individual clustering key ONLY IF any clustering keys defined before the end column in the primary key definition are already specified by the = operator in the predicate.
They do not work with secondary indexes.
Consider the following table definition:
CREATE TABLE tod1 (name text, time timestamp, val float, PRIMARY KEY (name, time));
In this case, you CANNOT do a range in val.
Consider this:
CREATE TABLE tod2 (name text, time timestamp, val float, PRIMARY KEY (name, time, val));
Then the following is true:
SELECT * FROM tod2 WHERE name='X' AND time='timehere' AND val < 5;
The difference is meaningless, but this is not true:
SELECT * from tod2 WHERE name='X' AND val < 5;
This is not valid because you did not filter out the previous clustering key in the primary key definition (in this case, time).
At your request, you can do this:
CREATE TABLE tod3 (name text, time timestamp, val float, PRIMARY KEY (name, val, time));
Note the column order of the primary key: val before time.
This will allow you to do:
SELECT * from tod3 WHERE name='asd' AND val < 5;
On the other hand, how long are you going to store the data? How often do you get evidence? This can lead to the rapid growth of your section. You might want to write it into several sections (manual scalding). Perhaps one section per day? Of course, such things are highly dependent on your access patterns.
Hope this helps.