Open bragadanilo opened 5 years ago
I've defined an attribute to have the local secondary index. The table was created manually using aws cli which I'm able to see the LSI created.
aws cli
@DynamoDBAttribute(attributeName = "status") @DynamoDBIndexRangeKey(localSecondaryIndexName = "statusLocalIndex") public String getStatus() ...
@DynamoDBAttribute(attributeName = "status")
@DynamoDBIndexRangeKey(localSecondaryIndexName = "statusLocalIndex")
public String getStatus() ...
When I perform a call in my repository using a list of items to be used in a filter, it's doing a scan operation, where I expect to be a query operation since It's using only indexed fields.
Repository method: Page<Order> findAllByOrderIdAndStatusIn(List<String> status) ..
Page<Order> findAllByOrderIdAndStatusIn(List<String> status) ..
-ps: orderId is the hash key
Expected Behavior
I've defined an attribute to have the local secondary index. The table was created manually using
aws cli
which I'm able to see the LSI created.@DynamoDBAttribute(attributeName = "status")
@DynamoDBIndexRangeKey(localSecondaryIndexName = "statusLocalIndex")
public String getStatus() ...
Actual Behavior
When I perform a call in my repository using a list of items to be used in a filter, it's doing a scan operation, where I expect to be a query operation since It's using only indexed fields.
Repository method:
Page<Order> findAllByOrderIdAndStatusIn(List<String> status) ..
-ps: orderId is the hash key
Specifications