Cassandra - Query a column with collection type
You can index collection types in cassandra 2.1 and later. You are after:
SELECT * FROM &lt;table&gt; WHERE &lt;field&gt; CONTAINS &lt;value_in_list/map/set&gt;

Detailed example:

cqlsh&gt; USE ks;
cqlsh:ks&gt; CREATE TABLE data_points (
            id text PRIMARY KEY,
            created_at timestamp,
            previous_event_id varchar,
            properties map&lt;text,text&gt;
         );
cqlsh:ks&gt; create index on data_points (properties);
cqlsh:ks&gt; INSERT INTO data_points (id, properties) VALUES ('1', { 'fruit' : 'apple', 'band' : 'Beatles' });
cqlsh:ks&gt; INSERT INTO data_points (id, properties) VALUES ('2', { 'fruit' : 'cherry', 'band' : 'Beatles' });
cqlsh:ks&gt; SELECT * FROM data_points WHERE properties CONTAINS 'Beatles';

 id | created_at | previous_event_id | properties
----+------------+-------------------+----------------------------------------
  2 |       null |              null | {'band': 'Beatles', 'fruit': 'cherry'}
  1 |       null |              null |  {'band': 'Beatles', 'fruit': 'apple'}

(2 rows)


Word of warning, secondary indexes don't scale out well as they use a scatter/gather algorithm to find what you need, if you plan to use them for heavy tagging it might be better to denormalize the properties field int a separate table and carry out multiple queries.

Further reading:


Is it possible to use cql to query collections in a row?