I have a List with ID's of type String. I want to scan DynamoDB and get a result list with items that do NOT have these ID's. But I can not figure out how to type the filter expression. ReviewId is the primary partition key of type String.
Map<String, AttributeValue> eav = new HashMap<>();
eav.put(":idFilter", new AttributeValue().withSS(idFilter));
DynamoDBScanExpression scanExp = new DynamoDBScanExpression()
.withFilterExpression("ReviewId <> (:idFilter)")
.withExpressionAttributeValues(eav);
The above filter expression is valid but it still always returns items with id's in the list.
I have also tried to include the word in
before and after the <>
operator.