我有以下架构:
var ClientFeature = dynamo.define('ClientFeature', {
hashKey : 'client',
rangeKey: 'feature',
schema : {
client: Joi.string(), //Foreign key to service
feature: Joi.string(), //Foreign Key to Feature
date: Joi.date() //Date created
}
});
和
var User = dynamo.define('User', {
hashKey: 'client',
rangeKey: 'email',
schema : {
email : Joi.string().email(),
client: Joi.string(),
type: Joi.string(),
password : Joi.string()
},
indexes : [{
hashKey : 'email', rangeKey : 'password', name : 'EmailPasswordIndex', type : 'global', projection: { NonKeyAttributes: [ 'type' ], ProjectionType: 'INCLUDE' }
}]
});
现在,我正在使用此表category
创建两者的汇总。问题是我想要category
表中两个表中的两个主键,但是,两个表都有复合键(hashKey和rangeKey),它们的总和为2 ^ 4 = 16个全局索引。 Dynamodb(Amazon AWS)仅支持5个索引。有什么建议吗?