I have a columnfamily like:
CREATE COLUMN FAMILY Watchdog
WITH key_validation_class =
'CompositeType(LexicalUUIDType,LexicalUUIDType)'
AND comparator = UTF8Type
AND column_metadata = [
{column_name: error_code, validation_class: UTF8Type, index_type:
KEYS}
{column_name: line, validation_class: IntegerType}
{column_name: file_path, validation_class: UTF8Type}
{column_name: function, validation_class: UTF8Type}
{column_name: content, validation_class: UTF8Type}
{column_name: additional_data, validation_class: UTF8Type}
{column_name: date_created, validation_class: DateType, index_type:
KEYS}
{column_name: priority, validation_class: IntegerType, index_type:
KEYS}
];
Row key is a combo of 2 uuid, the first it's the user's uuid, if i want a
select of all the watchdog entrys of a user.........how can i do? is it
possible? I justk know user uuid, the other part of key is unknow uuid.
The idea is simple, i have a user and i want all the records on watchdog,
and i want secondary index to do search.........very simple with mysql but
here i can't find the way.
If i do with a supercolumn i can use secondary indexes, if key is composite
there is no way for select all data related to a user...............
The ugly way:
CREATE COLUMN FAMILY Watchdog
WITH key_validation_class = LexicalUUIDType
AND comparator = UTF8Type
AND column_metadata = [
{column_name: user_uuid, validation_class: LexicalUUIDType,
index_type: KEYS}
{column_name: error_code, validation_class: UTF8Type, index_type:
KEYS}
{column_name: line, validation_class: IntegerType}
{column_name: file_path, validation_class: UTF8Type}
{column_name: function, validation_class: UTF8Type}
{column_name: content, validation_class: UTF8Type}
{column_name: additional_data, validation_class: UTF8Type}
{column_name: date_created, validation_class: DateType, index_type:
KEYS}
{column_name: priority, validation_class: IntegerType, index_type:
KEYS}
];
But i think that is not a nice solution because y always need to search in
all rows of very big tables to take all user's data...............
Please.... can help?
Thanks.
--
Juan Ezquerro LLanes <Sofistic Team>
Telf: 618349107/964051479