1

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.

danilobraga
  • 165
  • 1
  • 9

1 Answers1

2

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;
    }
danilobraga
  • 165
  • 1
  • 9