进出口新的卡桑德拉和我试着去创建一个模式,这将让我有一个行作为卡桑德拉:创建的CompositeType列
users: {
name: <value>,
...
phone_numbers:1: <value>,
phone_numbers:2: <value>,
...
phone_numbers: <value>
}
我一直在阅读了关于组合柱,并只能够找到主键是组合的例子。那么是否有可能在一个CF上面有上述内容?
我的尝试是: -
create column family users with comparator=AsciiType
and key_validation_class=AsciiType
and column_metadata=[
{column_name: name, validation_class: AsciiType, index_type: KEYS},
{column_name: phone_numbers, validation_class: CompositeType(AsciiType, IntegerType), index_type: KEYS}];
上面的失败。 任何帮助理解 欢呼声
因此将最好的方式来设计我的模式是两个的CF?一个用于比较= AsciiType和第二个CF的用户是带comparitor = CompositeType(AsciiType,IntegerType)的user_phone_numers? – krone
我以为你的OP是regd创建CompositeTypes:P Incase你需要一些模式的帮助尝试描述你的用例和读取,写入模式 – Tamil