0
有沒有辦法通過將範圍鍵設置爲NOT EQUAL值來查詢AWS DynamoDB。不等於範圍鍵android AWS Dynamo DB
我有下面的代碼,我希望將工作:
Condition rangeKey = new Condition()
.withComparisonOperator(ComparisonOperator.NE)
.withAttributeValueList(new
AttributeValue().withS(TestArray[0]));
conditionHashMap.put("ID", rangeKey);
queryExpression
.withIndexName("Index Key")
.withHashKeyValues(KEYVALUE)
.withRangeKeyConditions(conditionHashMap)
.withConsistentRead(false);
但它總是引發以下錯誤:
Attempted conditional constraint is not an indexable operation
試圖改變ComparisonOperator到NOT_CONTAINS但同樣的問題。通過大量的文章看來,似乎對條件操作符的查詢有一些限制。
問題是。有沒有一種解決方法可以給出與不相等或不包含相同的結果?