Reputation: 165
I'm using the spring-data-dynamodb in my project. I know that's possible to use Global Secondary Index (GSI), there's an example in the documentation.
But, I need to use Local Secondary Indexes (LSI), I couldn't find any example of it.
Do you know if spring-data-dynamodb supports LSI?
Thank you!
ps: I'm not asking about the difference between them, or when to use one or another approach.
Upvotes: 1
Views: 1639
Reputation: 165
I found a solution, just posting it here to let everyone aware.
it should be used this annotation: @DynamoDBIndexRangeKey(localSecondaryIndexName = "fieldIdLocalIndex")
@DynamoDBIndexRangeKey(localSecondaryIndexName = "fieldIdLocalIndex")
public String getFieldId() {
return fieldId;
}
Upvotes: 2