gpt4 book ai didi

android - 没有哈希键条件适用于指定的索引

转载 作者:行者123 更新时间:2023-11-30 02:04:42 30 4
gpt4 key购买 nike

我正在尝试使用带有索引名称并在对象中定义 secondryGlobalIndex 的查询表达式从 dynamoDB 进行查询。

但是响应是

Illegal query expression: No hash key condition is applicable to the specified index

我正在使用的代码

DynamoDBQueryExpression queryExpression = new DynamoDBQueryExpression()
.withHashKeyValues(valueObject)
.withIndexName("postID-commentTime-index")
.withConsistentRead(false);



try {
PaginatedQueryList<ValueObject> result =
(PaginatedQueryList) mapper.query(valueObjectClass, queryExpression);

最佳答案

查询索引时的关键条件属于索引的架构,而不是基表。确保您传递给查询的关键条件是针对索引而不是基表。

关于android - 没有哈希键条件适用于指定的索引,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30866959/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com