0
我的表架构是迪纳摩QuerySpec与GSI
virtual_key(hashKey) actual_key(GSI)
现在我想根据我actual_key像下面
final QuerySpec spec = new QuerySpec()
.withHashKey("actual_key", "1234");
final Index index = table.getIndex("actual_key");
final ItemCollection<QueryOutcome> result = index.query(spec);
我要查询索引很确定,项目'actual_key:1234'在我的表中存在,但我得到一个空的结果集。 注:我甚至尝试
final QuerySpec spec = new QuerySpec()
.withKeyConditionExpression("actual_key = :v_key")
.withValueMap(new ValueMap().withString(":v_key","1234"));
我不明白的地方,我犯了一个错误?和 我们可以使用'.withHashKey'作为GSI吗?
你能显示你的数据吗?截图还是什么?并描述表格输出。 – notionquest